# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
72531 | 2018-08-26T08:50:28 Z | IDxTree(#2155, TAMREF, imeimi2000, Diuven) | 재채점 전쟁 (FXCUP3_judge) | C++17 | 193 ms | 3488 KB |
#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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Output is correct |
2 | Correct | 3 ms | 356 KB | Output is correct |
3 | Correct | 3 ms | 480 KB | Output is correct |
4 | Correct | 2 ms | 516 KB | Output is correct |
5 | Correct | 5 ms | 516 KB | Output is correct |
6 | Correct | 5 ms | 516 KB | Output is correct |
7 | Correct | 5 ms | 516 KB | Output is correct |
8 | Correct | 5 ms | 516 KB | Output is correct |
9 | Correct | 5 ms | 544 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Output is correct |
2 | Correct | 3 ms | 356 KB | Output is correct |
3 | Correct | 3 ms | 480 KB | Output is correct |
4 | Correct | 2 ms | 516 KB | Output is correct |
5 | Correct | 5 ms | 516 KB | Output is correct |
6 | Correct | 5 ms | 516 KB | Output is correct |
7 | Correct | 5 ms | 516 KB | Output is correct |
8 | Correct | 5 ms | 516 KB | Output is correct |
9 | Correct | 5 ms | 544 KB | Output is correct |
10 | Incorrect | 193 ms | 3488 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Output is correct |
2 | Correct | 3 ms | 356 KB | Output is correct |
3 | Correct | 3 ms | 480 KB | Output is correct |
4 | Correct | 2 ms | 516 KB | Output is correct |
5 | Correct | 5 ms | 516 KB | Output is correct |
6 | Correct | 5 ms | 516 KB | Output is correct |
7 | Correct | 5 ms | 516 KB | Output is correct |
8 | Correct | 5 ms | 516 KB | Output is correct |
9 | Correct | 5 ms | 544 KB | Output is correct |
10 | Incorrect | 193 ms | 3488 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |