# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19941 | yukariko | 동전 (kriii4_E) | C++98 | 0 ms | 1720 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 987654321
typedef long long lld;
// (연속된 짝수개의 0)%2 == (연속된 홀수개의 0)%2
char trace[10];
bool isCorrect(char *s, const int& L){
int i, odd=0, even=0, cnt=0;
int oneCount=0;
for(i=0; i<L; ++i){
if(s[i] == '0'){
cnt = 0;
while(s[i+cnt]=='0') cnt++;
if(cnt&1) odd += 1;
else even += 1;
i += cnt-1;
oneCount += cnt==1;
}
}
if(odd == 1 || even == 1) return false;
if(oneCount&1) return false;
return odd%2 == even%2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |