上一页 1 ··· 5 6 7 8 9
摘要: #include<iostream>#include<cmath>#include<algorithm>#include<vector>using namespace std;int main(){ int n; while(cin>>n) { vector<int> a(3000); vector<int> b(3000); cin>>a[0]; for(int i=1;i<n;i++) { cin>>a[i]; b[i]=abs(a[i]-a[i-1]);... 阅读全文
posted @ 2012-04-28 11:51 open your eyes 阅读(207) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cstring>using namespace std;char a[100]="`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";int main(){ char ch[1000]; while(cin.getline(ch,1000)) { for(int i=0;i<strlen(ch);i++) { if(isgraph(ch[i])&&!isdigit(ch[i])) { ... 阅读全文
posted @ 2012-04-28 11:50 open your eyes 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<vector>#include<cmath>#include<cstring>#include<algorithm>using namespace std;int main(){ int n,a[600]; cin>>n; while(n--) { int m,i; cin>>m; vector<int> sum(m,0); for(i=0;i<m;i++) { cin>>a[i]; } for(i... 阅读全文
posted @ 2012-04-28 11:50 open your eyes 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>char a[300]={'\0'},b[300]={'\0'};int mult[610]={0},na[300]={0},la,nb[300]={0},lb;int main(){ int i,j; while(scanf("%s%s",a,b)==2) { la=strlen(a); lb=strlen(b); for(i=0;i<la;i++) na[i]=a[la-1-i]-'0'; for(j=0;j<lb 阅读全文
posted @ 2012-04-28 11:49 open your eyes 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 int main() 5 { 6 int n,i; 7 string sa,a,b; 8 string s[100],ss[100]; 9 while(cin>>n)10 {11 if(n==0)break;12 cin.ignore();13 for(i=0;i<n;i++)14 {15 getline(cin,s[i]);16 ... 阅读全文
posted @ 2012-04-28 11:46 open your eyes 阅读(130) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9