随笔分类 -  程序设计实习习题解

摘要:#include<iostream> #include<algorithm> using namespace std; int a,b; int gcd(int a,int b) { if(a%b==0) return b; else return gcd(b,a%b); } int main() 阅读全文
posted @ 2016-01-28 12:12 OZTOET 阅读(246) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> using namespace std; int a[5][5];int b[5][5]; #define rep(i,j,k) for(int i=j;i<=k;i++) int n=4; string s[20]; void 阅读全文
posted @ 2016-01-28 12:11 OZTOET 阅读(180) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> #include<algorithm> using namespace std; int a[30],b[30]; string sa,sb; #define rep(i,j,k) for(int i=j;i<=k;i++) b 阅读全文
posted @ 2016-01-28 12:10 OZTOET 阅读(272) 评论(0) 推荐(0)
摘要:#include<iostream> #include<cstdio> using namespace std; int n; #define rep(i,j,k) for(int i=j;i<=k;i++) int main() { int sum=0; cin>>n; int tmp; rep( 阅读全文
posted @ 2016-01-28 12:10 OZTOET 阅读(365) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> using namespace std; int a[20][20];int b[20][20]; #define rep(i,j,k) for(int i=j;i<=k;i++) int n; string s[20]; vo 阅读全文
posted @ 2016-01-28 12:09 OZTOET 阅读(321) 评论(0) 推荐(0)
摘要:#include<iostream> using namespace std; int recur(int m,int n) { if(n==1) return 1; if(m==0) return 1; int sum=0; if(m>=n) sum+=recur(m-n,n); sum+=rec 阅读全文
posted @ 2016-01-28 12:09 OZTOET 阅读(192) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> using namespace std; int sum[201]; string s; int main() { while(cin>>s&&!(s.length()==1&&s[0]=='0')) { int x=s.len 阅读全文
posted @ 2016-01-28 12:08 OZTOET 阅读(178) 评论(0) 推荐(0)
摘要:#include<iostream> using namespace std; int a; int main() { cin>>a; if((a%100!=0&&a%4==0)||(a%400==0)) cout<<"Y"; else cout<<"N"; } 阅读全文
posted @ 2016-01-28 12:08 OZTOET 阅读(167) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> #include<cstring> using namespace std; int a[201]; string s;int n; #define rep(i,j,k) for(int i=j;i<=k;i++) #defin 阅读全文
posted @ 2016-01-28 12:07 OZTOET 阅读(446) 评论(0) 推荐(0)