随笔分类 - 编程题
HDU online 1006 Tick and Tick
摘要:Tick and Tick Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20859 Accepted Submission(s): 5470
阅读全文
航电1018 Big Number
摘要:Problem Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission o
阅读全文
1154. Easy sort
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int main(){ 7 int t; 8 cin>>t; 9 while(t--){ 10 int n; 11 cin>>n; 12 int a[n]; 13 ...
阅读全文
1500. Prime Gap 11 月 11日
摘要:1 /*本篇为转载,在此申明,具体就是先设定从2以后所有的数都为质数,定为质数的数的倍数则不是质数,慢慢排除后面的数*/ 2 3 4 5 #include 6 #include 7 using namespace std; 8 const int N = 1300000;//第10万个数为1299709 9 int prime[N]; 10 bool notPrim...
阅读全文
1036. Crypto Columns 2016 11 02
摘要:1 /* 2 对于题目多读几遍,然后再关键字排序的时候,把对应的数组序号也排序, 3 EYDE 4 MBLR 5 THAN 6 MEKT 7 ETOE 8 EOTH 9 10 MEETME 11 BYTHEO 12 LDOAKT 13 REENTH 14 15 16 */ 17 #...
阅读全文
sicily 1007. To and Fro 2016 11 02
摘要:1 // Problem#: 1007 2 // Submission#: 4893204 3 // The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License 4 // URI: http://creativecommons.or...
阅读全文
Mispelling 1510
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int t; 8 cin>>t; 9 int a = t; 10 getchar(); 11 while(t--){ 12 string s; 13 int n; 14 cin>>n; 15 getcha...
阅读全文
最小公倍数
摘要:1 #include 2 using namespace std; 3 int main(){ 4 long long a,b; 5 long long d,e; 6 while(cin>>a>>b){ 7 d=a;e=b; 8 int c; 9 if(a<b){ 10 long long t; 11 t=a; 12 a=b; 13 b...
阅读全文
1795. Table tennis
摘要:1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int n; 6 cin>>n; 7 while(n--){ 8 int t; 9 cin>>t; 10 int points=0; 11 while(t--){ 12 int a,b; 13 cin>>a>>b; 14 ...
阅读全文
1561 PRIME
摘要:1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 int n; 7 cin>>n; 8 if(n==1) { 9 cout<<2<<endl; 10 return 0; 11 } 12 n=n-1; 13 int t=3; 14 while...
阅读全文
1294. 高级机密
摘要:1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int a,b,c; 6 cin>>a>>b>>c; 7 long long sum=1; 8 for(int i=1;i<=b;i++){ 9 sum = sum*a%c; 10 } 11 cout<<sum%c<<endl; 12 re...
阅读全文
1293. 3n+1数链问题
摘要:1 #include 2 using namespace std; 3 int main() 4 { 5 int i,j; 6 cin>>i>>j; 7 int max=0; 8 for(int t=i;tmax) max=len; 22 } 23 cout<<max<<endl; 24 return 0; 25 }
阅读全文
浙公网安备 33010602011771号