# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72531 | IDxTree (#118) | Judge Against Wrong Code (FXCUP3_judge) | C++17 | 193 ms | 3488 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 <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_map>
#include <functional>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cstdlib>
using namespace std;
typedef long long llong;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<llong, llong> pll;
int x, d, c;
int dat[500000];
int cod[500000];
char in[50];
char ans[500001];
int main() {
scanf("%d%d", &x, &d);
for (int i = 0; i < d; ++i) {
scanf("%s", in);
for (int j = 0; j < x; ++j) {
dat[i] <<= 1;
if (in[j] == 'o') dat[i] ^= 1;
}
}
scanf("%d", &c);
for (int i = 0; i < c; ++i) {
scanf("%s", in);
for (int j = 0; j < x; ++j) {
cod[i] <<= 1;
if (in[j] == '.') cod[i] ^= 1;
}
}
for (int i = 0; i <= c; ++i) ans[i] = 'x';
for (int i = 0; i < (1 << d); ++i) {
int x = 0;
for (int j = 0; j < d; ++j) {
if ((i >> j) & 1) x |= dat[j];
}
int cnt = 0;
for (int j = 0; j < c; ++j) {
if ((x & cod[j]) != x) ++cnt;
}
ans[cnt] = 'o';
}
printf("%s\n", ans + 1);
return 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... |