# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
72063 | 2018-08-26T05:04:53 Z | (#2175, xdoju, kazel, pps789) | 재채점 전쟁 (FXCUP3_judge) | C++17 | 1500 ms | 1968 KB |
#include<cstdio> #include<algorithm> #include<vector> using namespace std; bool attack[1<<20]; int target[1<<20]; int X,D,C; char buff[22]; bool ans[555555]; int main(){ scanf("%d",&X); scanf("%d",&D); for(int i=0;i<D;i++){ scanf("%s",buff); int cur = 0; for(int i=0;i<X;i++) if(buff[i]=='o') cur |= (1<<i); attack[cur] = true; } scanf("%d",&C); for(int i=0;i<C;i++){ scanf("%s",buff); int cur = 0; for(int i=0;i<X;i++) if(buff[i]=='x') cur |= (1<<i); target[cur]++; } attack[0] = target[0] = 0; for(int i=0;i<(1<<X);i++) if(attack[i]){ for(int j=0;j<(1<<X);j++) if(attack[j]){ attack[i|j] = true; } } for(int i=0;i<(1<<X);i++) if(attack[i]){ int cur = 0; for(int j=0;j<(1<<X);j++) if(i&j){ cur += target[j]; } ans[cur] = true; } for(int i=1;i<=C;i++) if(ans[i]) printf("o"); else printf("x"); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 488 KB | Output is correct |
3 | Correct | 2 ms | 488 KB | Output is correct |
4 | Correct | 2 ms | 488 KB | Output is correct |
5 | Correct | 17 ms | 512 KB | Output is correct |
6 | Correct | 64 ms | 616 KB | Output is correct |
7 | Correct | 26 ms | 640 KB | Output is correct |
8 | Correct | 11 ms | 640 KB | Output is correct |
9 | Correct | 3 ms | 640 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 488 KB | Output is correct |
3 | Correct | 2 ms | 488 KB | Output is correct |
4 | Correct | 2 ms | 488 KB | Output is correct |
5 | Correct | 17 ms | 512 KB | Output is correct |
6 | Correct | 64 ms | 616 KB | Output is correct |
7 | Correct | 26 ms | 640 KB | Output is correct |
8 | Correct | 11 ms | 640 KB | Output is correct |
9 | Correct | 3 ms | 640 KB | Output is correct |
10 | Correct | 114 ms | 1072 KB | Output is correct |
11 | Correct | 66 ms | 1072 KB | Output is correct |
12 | Correct | 12 ms | 1072 KB | Output is correct |
13 | Correct | 158 ms | 1072 KB | Output is correct |
14 | Correct | 450 ms | 1072 KB | Output is correct |
15 | Correct | 615 ms | 1416 KB | Output is correct |
16 | Correct | 289 ms | 1416 KB | Output is correct |
17 | Correct | 793 ms | 1416 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 488 KB | Output is correct |
3 | Correct | 2 ms | 488 KB | Output is correct |
4 | Correct | 2 ms | 488 KB | Output is correct |
5 | Correct | 17 ms | 512 KB | Output is correct |
6 | Correct | 64 ms | 616 KB | Output is correct |
7 | Correct | 26 ms | 640 KB | Output is correct |
8 | Correct | 11 ms | 640 KB | Output is correct |
9 | Correct | 3 ms | 640 KB | Output is correct |
10 | Correct | 114 ms | 1072 KB | Output is correct |
11 | Correct | 66 ms | 1072 KB | Output is correct |
12 | Correct | 12 ms | 1072 KB | Output is correct |
13 | Correct | 158 ms | 1072 KB | Output is correct |
14 | Correct | 450 ms | 1072 KB | Output is correct |
15 | Correct | 615 ms | 1416 KB | Output is correct |
16 | Correct | 289 ms | 1416 KB | Output is correct |
17 | Correct | 793 ms | 1416 KB | Output is correct |
18 | Execution timed out | 1576 ms | 1968 KB | Time limit exceeded |
19 | Halted | 0 ms | 0 KB | - |