| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 72284 | 김동현보다 잘함 (#118) | 재채점 전쟁 (FXCUP3_judge) | C++17 | 437 ms | 9516 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
int n, c, d;
int cnt[1100000], dnt[1100000], rd[1100000], ans[500100];
void calc(int cnt[]) {
    int i, j;
    for (i=0;i<n;i++){
        for (j=0;j<(1<<n);j++) {
            if (j>>i&1) cnt[j] += cnt[j^(1<<i)];
        }
    }
    for (i=(1<<n)-1;i>=0;i--) {
        for (j=0;j<n;j++) {
            if (i>>j&1) {
                if (cnt[i]==cnt[i^(1<<j)]) {
                    cnt[i] = 0;
                    break;
                }
            }
        }
    }
}
void rcalc(int cnt[]) {
    int i, j;
    for (i=0;i<n;i++){
        for (j=0;j<(1<<n);j++) {
            if ((j>>i&1)==0) cnt[j] += cnt[j^(1<<i)];
        }
    }
}
char buf[21];
int main() {
    int i;
    scanf("%d",&n);
    scanf("%d",&c);
    for (i=0;i<c;i++){
        scanf("%s",buf);
        int v = 0;
        for (int j=0;j<n;j++) {
            v *= 2;
            v += (buf[j]=='o');
        }
        cnt[v]++;
    }
    scanf("%d",&d);
    for (i=0;i<d;i++){
        scanf("%s",buf);
        int v = 0;
        for (int j=0;j<n;j++) {
            v *= 2;
            v += (buf[j]=='.');
        }
        dnt[v]++;
    }
    calc(cnt);
    rcalc(dnt);
    for (i=0;i<(1<<n);i++) {
        if (!cnt[i])continue;
        ans[d-dnt[i]]=1;
    }
    for (i=1;i<=d;i++) printf(ans[i]?"o":"x");
    printf("\n");
    return 0;
}
컴파일 시 표준 에러 (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... | ||||
