上一页 1 ··· 13 14 15 16 17

nefu 84 http://acm.nefu.edu.cn/test/problemshow.php?problem_id=84

摘要: #includeusing namespace std;typedef long long inta;int extend_gcd(inta a,inta b,inta &x,inta &y,inta &gcd){ if(b==0) { x=1; y=0; gcd=a; } else { extend_gcd(b,a%b,x,y,gcd); int temp=x; x=y; y=temp-a/b*y; }}int gcd(int a,int b){ if(b==0) return a; ... 阅读全文
posted @ 2013-07-08 18:12 814jingqi的ACM 阅读(139) 评论(0) 推荐(0) 编辑

poj 1061 青蛙的约会 二元一次不定方程 http://poj.org/problem?id=1061

摘要: #includeusing namespace std;typedef long long inta;int extend_gcd(inta a,inta b,inta &x,inta &y,inta &gcd){ if(b==0) { x=1; y=0; gcd=a; } else { extend_gcd(b,a%b,x,y,gcd); int temp=x; x=y; y=temp-a/b*y; }}int gcd(int a,int b){ if(b==0) return a; ... 阅读全文
posted @ 2013-07-08 18:03 814jingqi的ACM 阅读(123) 评论(0) 推荐(0) 编辑

2013 World Final 排名

摘要: #Team UniversitySolvedTimeABCDEFGHIJK1St. Petersburg National Research University of IT, Mechanics and Optics98911-430-11-772-171-1312-271-141-571-1571-1152-2072Shanghai Jiao Tong University89341-8513-921-451-43-46G1-1131-2071-562-1903The University of Tokyo810601-783-1912-1651-270-12-211-43-1401-22 阅读全文
posted @ 2013-07-03 21:13 814jingqi的ACM 阅读(571) 评论(0) 推荐(0) 编辑

hdu 2099 整数的尾数 http://acm.hdu.edu.cn/showproblem.php?pid=2099

摘要: #includeusing namespace std;int main(){ int a,b; while(cin>>a>>b) { int tag=0; if(a==0&&b==0) break; for(int i=0;i<=9;i++) for(int j=0;j<=9;j++) { int final=a*100; final+=i*10+j; if(final%b==0) { if(tag==1) ... 阅读全文
posted @ 2013-07-03 14:41 814jingqi的ACM 阅读(137) 评论(0) 推荐(0) 编辑

nefu 116

摘要: #includeusing namespace std;int gcd(int a,int b){ if(a>n>>m) { result=n; result/=gcd(m,n); result*=m; cout<<result<<endl; }}// 最大公约数 最小公倍数求法 注意可能 m和n互素 乘积超过int范围 阅读全文
posted @ 2013-07-03 01:38 814jingqi的ACM 阅读(126) 评论(0) 推荐(0) 编辑

nefu 115

摘要: #includeusing namespace std;int main(){ int n; while(cin>>n) { if(n%12==0) cout 6|n 阅读全文
posted @ 2013-07-03 01:26 814jingqi的ACM 阅读(139) 评论(0) 推荐(0) 编辑

hdu 1003,hdu 1231 最长连续和

摘要: 题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1003#include #include#includeusing namespace std;int main(){ //ifstream cin("testdata.txt"); int n=0; cin>>n; for(int l=0;l>size; int *p=new int[size]; for(int i=0;i>p[i]; int begin=0; int end=0; ... 阅读全文
posted @ 2013-05-20 01:44 814jingqi的ACM 阅读(108) 评论(0) 推荐(0) 编辑

杭电1002

摘要: #include#includeusing namespace std;int main(){ int size=0; cin>>size; /*char * p=new char[100]; char * q=new char[100];*/ string p=""; string q=""; int * result=new int[1001]; for(int l=0;l>p>>q; string p_backup=p; string q_backup=q; int n=p.length(); int m=q.leng 阅读全文
posted @ 2013-05-15 21:19 814jingqi的ACM 阅读(100) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17