随笔分类 -  codeforce

摘要:也是水题一个,不过稍微要细心点。。。。贴代码: 1 #include 2 using namespace std; 3 long long n,m; 4 long long ans=0; 5 int main() 6 { 7 long long s=0,t; 8 cin>>n>>m; 9 cin>>s;10 ans=s-1;11 for(int i=1;i>t;14 if(t<s)15 ans+=(n-s+t);16 else ans+=(t-s);17 s=t;18 }19... 阅读全文
posted @ 2013-08-27 09:42 Yours1103 阅读(146) 评论(0) 推荐(0)
摘要:水题一个;直接贴代码: 1 #include 2 #include 3 #include 4 using namespace std; 5 char s[110]; 6 int num[100]; 7 int main() 8 { 9 int cnt=0;10 scanf("%s",s);11 for(int i=0;i<strlen(s);i++)12 {13 if(s[i]!='+')14 num[cnt++]=s[i]-'0';15 }16 if(cnt==0) {printf("\n");return 0;. 阅读全文
posted @ 2013-08-27 09:40 Yours1103 阅读(147) 评论(0) 推荐(0)