# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
26361 | tlwpdus | Ili (COI17_ili) | C++98 | 1069 ms | 2216 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;
int n, m;
char str[20100];
char ttr[20100];
int son[20100][2];
int getn(char str[]) {
int i, x = 0;
for (i=0;str[i]>='0'&&str[i]<='9';i++) {
x *=10;
x+=str[i]-'0';
}
return x;
}
bool can0(int idx) {
int i;
for (i=0;i<n+m;i++) ttr[i] = str[i];
ttr[idx] = '0';
for (i=n+m;i>=n;i--) {
if (ttr[i]=='0') {
if (ttr[son[i][0]]=='1'||ttr[son[i][1]]=='1') return false;
ttr[son[i][1]]=ttr[son[i][0]]='0';
}
}
for (i=n;i<n+m;i++) {
if (ttr[son[i][0]]=='0'&&ttr[son[i][1]]=='0') {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |