水~。 注意右半部为$0$的情况。 int main() { int T; cin>>T; while(T--) { string s; cin>>s; string a=s.substr(0,s.size()/2),b=s.substr(s.size()/2); int ts=stoi(s),ta ...
分类:
其他好文 时间:
2021-03-04 13:05:25
阅读次数:
0
[P6154] 游走 - 期望 Description 给定一个有向无环图,求其中一条路径长度的期望。 Solution 一条路径长度的期望 = 所有路径长度和 / 所有路径条数 计算这两个东西用 dp,设 \(f[i]\) 为 i 出发的路径的长度和,\(c[i]\) 为 i 出发的路径的条数 转 ...
分类:
其他好文 时间:
2021-03-03 12:02:11
阅读次数:
0
{ //http://www.360doc.com/content/14/0413/16/15099545_368549362.shtml } GCC/Clang生成和链接静态库/动态库 { 1 2 3 4 5 //add.cpp int add(int a, int b) { return a + ...
分类:
编程语言 时间:
2021-03-01 14:16:36
阅读次数:
0
A - Circle #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int r; int main(){ cin >> r; cout << r * r << end ...
分类:
其他好文 时间:
2021-02-24 13:15:50
阅读次数:
0
https://codeforces.com/contest/1490/problem/G 二分循环几轮,再二分哪个位置刚好够。 1 #define IO std::ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 2 #define bug(x) co ...
分类:
其他好文 时间:
2021-02-24 13:01:05
阅读次数:
0
状态表示: \(f[len][cnt]\):当前为len位,已经统计的$0$的个数为cnt,不计前导$0$。 注意点: 由于前导$0$标识符lead的存在,如果左边界为$0$需要作加一处理。 LL f[15][15]; int a[15]; LL dfs(int len,int cnt,bool l ...
分类:
其他好文 时间:
2021-02-22 12:28:38
阅读次数:
0
1import java.util.HashMap; 2import java.util.Map; 3 4/** 5 * 1. 两数之和 6 * 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 的那 两个 整数,并返回它们的数组下标。 7 * <p> 8 ...
分类:
其他好文 时间:
2021-02-22 11:54:49
阅读次数:
0
介绍线程池的五种状态RUNNING、SHUTDOWN、STOP、TIDYING和TERMINATED,并简述五种状态之间的切换。 ...
分类:
编程语言 时间:
2021-02-20 12:23:58
阅读次数:
0
水题~。 魔鬼变量名。 vector<int> positive_coupon,negative_coupon; vector<int> positive_product,negative_product; int nc,np; int main() { cin>>nc; for(int i=0;i ...
分类:
其他好文 时间:
2021-02-20 11:51:01
阅读次数:
0
#include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; int main() { int n; cin>>n; vector<int> a; for(int i=0;i<n;i++) { ...
分类:
其他好文 时间:
2021-02-19 13:54:37
阅读次数:
0