codeforces298c

August 17, 2013
CodeForces

link:http://codeforces.com/problemset/problem/298/C 这道题目可以看出来我智商确实拙计


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <queue>
#include <deque>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <functional>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <cassert>
#include <ctime>
#include <iterator>
const int INF = 0x3f3f3f3f;
const int dir[8][2] = {{-1,0},{1,0},{0,-1},{0,1},{-1,-1},{-1,1},{1,-1},{1,1}};
using namespace std;
char a[1111],b[1111];
int main(void)
{
    scanf("%s%s",a,b);
    int lena=strlen(a),lenb=strlen(b),cnt1=0,cnt2=0;
    for(int i=0;i<lena;++i) if(a[i]=='1') cnt1++;
    for(int i=0;i<lenb;++i) if(b[i]=='1') cnt2++;
    bool flag=true;
    if(cnt1%2==1) cnt1++;
    if(cnt1<cnt2) flag=false;
    if(flag) printf("YES\n"); else printf("NO\n");

    return 0;
}

拙计o(╯□╰)o

comments powered by Disqus