码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
1132 Cut Integer (20 分)
水~。 注意右半部为$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] 游走 - 期望
[P6154] 游走 - 期望 Description 给定一个有向无环图,求其中一条路径长度的期望。 Solution 一条路径长度的期望 = 所有路径长度和 / 所有路径条数 计算这两个东西用 dp,设 \(f[i]\) 为 i 出发的路径的长度和,\(c[i]\) 为 i 出发的路径的条数 转 ...
分类:其他好文   时间:2021-03-03 12:02:11    阅读次数:0
C/C++ GCC/Clang生成和链接静态库/动态库
{ //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
AtCoder Beginner Contest 145
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
Codeforces Round #702 (Div. 3)G(二分,模拟stl)
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
POJ 3286 How many 0's?
状态表示: \(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
Lc1_俩数之和
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
Java线程池状态和状态切换
介绍线程池的五种状态RUNNING、SHUTDOWN、STOP、TIDYING和TERMINATED,并简述五种状态之间的切换。 ...
分类:编程语言   时间:2021-02-20 12:23:58    阅读次数:0
1037 Magic Coupon (25 分)
水题~。 魔鬼变量名。 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
CCF 201809-1 卖菜
#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
7874条   上一页 1 ... 7 8 9 10 11 ... 788 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!