码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
1013 数素数 (20 分)
考虑到不知道第$104$个素数有多大,可以先用程序测试下第$104$个素数是多少。 const int N=2e5+10; int primes[N],cnt; bool vis[N]; void init(int n) { for(int i=2;i<=n;i++) if(!vis[i]) { p ...
分类:其他好文   时间:2021-02-16 12:14:01    阅读次数:0
1010 一元多项式求导 (25 分)
如果求导之后没有任何非零项,需要输出0 0。 int main() { string line; getline(cin,line); stringstream ss(line); int a,b; bool first=true; while(ss>>a>>b) { a*=b; b--; if(b ...
分类:其他好文   时间:2021-02-16 11:53:11    阅读次数:0
1026 程序运行时间 (15 分)
水题~,就简单转换下时间。 int a,b; int main() { cin>>a>>b; int tim=round((b-a)/100.0); int hh=tim/3600,mm=tim%3600/60,ss=tim%3600%60; printf("%02d:%02d:%02d\n",hh ...
分类:其他好文   时间:2021-02-15 12:25:04    阅读次数:0
1069 The Black Hole of Numbers (20 分)
注意不满$4$位的话要补成$4$位。 string s; set<int> S; int main() { cin>>s; while(s.size()<4) s='0'+s; while(true) { sort(s.begin(),s.end(),greater<char>()); string ...
分类:其他好文   时间:2021-02-15 12:21:49    阅读次数:0
Educational Codeforces Round 102 (Rated for Div. 2)E题(分层图、最短路)
https://codeforces.com/contest/1473/problem/E vector存图: 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0),cin.tie(0 ...
分类:其他好文   时间:2021-02-15 12:17:20    阅读次数:0
单源最短路 : 多起点
https://www.acwing.com/problem/content/1139/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-15 11:53:52    阅读次数:0
单源最短路 : 拆点
https://www.acwing.com/problem/content/1133/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-15 11:53:38    阅读次数:0
单源最短路 : 计数
https://www.acwing.com/problem/content/1136/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-15 11:53:26    阅读次数:0
equals和hashCode详解
equals和hashCode详解 http://www.cnblogs.com/Qian123/p/5703507.html 阅读目录 equals()方法详解 hashcode() 方法详解 Hashset、Hashmap、Hashtable与hashcode()和equals()的密切关系 j ...
分类:其他好文   时间:2021-02-09 12:25:29    阅读次数:0
数独检查
数独是一种流行的单人游戏。 目标是用数字填充9x9矩阵,使每列,每行和所有9个非重叠的3x3子矩阵包含从1到9的所有数字。 每个9x9矩阵在游戏开始时都会有部分数字已经给出,通常有一个独特的解决方案。 给定完成的N2?N2数独矩阵,你的任务是确定它是否是有效的解决方案。 有效的解决方案必须满足以下条 ...
分类:其他好文   时间:2021-02-09 12:16:43    阅读次数:0
7874条   上一页 1 ... 9 10 11 12 13 ... 788 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!