摘要: 题目:http://codeforces.com/contest/236/problem/A思路:模拟法#include <iostream>#include <cstring>using namespace std;int arr[26];int main(){ char str[100]; cin>>str; int charnum[100]; for(int i=0;i<26;i++) { arr[i]=0; } for(int i=0;i<strlen(str);i++) { charnum[i]=str[i]... 阅读全文
posted @ 2013-01-20 14:21 Daniel Qiu 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目:http://codeforces.com/contest/237/problem/A#include <iostream>using namespace std;int main(){ int ans=1; int n; cin>>n; int ap,bp; int a,b; cin>>a>>b; ap=a; bp=b; int counter=1; for(int i=0;i<n-1;i++) { cin>>a>>b; if((a==ap)&&(b==bp)) { ... 阅读全文
posted @ 2013-01-20 14:03 Daniel Qiu 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目:http://codeforces.com/contest/242/problem/A抛硬币 输出各种满足条件的结果#include <iostream>using namespace std;int arr[10000][2];int main(){ int x,y,a,b; cin>>x>>y>>a>>b; int n=0; for(int i=a;i<=x;i++) { for(int j=b;j<=y;j++) { if(i>j) { arr[n]... 阅读全文
posted @ 2013-01-20 11:09 Daniel Qiu 阅读(142) 评论(0) 推荐(0) 编辑