| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 688578 | rieyuw | Vlak (COCI20_vlak) | C++17 | 56 ms | 33996 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int mxN = 1e5+10;
vector<vector<array<int,3>>> nxt(mxN, vector<array<int,3>>(26));
 
bool dfs(int node, int depth)
{
    int par = (depth & 1);
    bool res = !par;
    for (int i = 0; i < 26 && res != par; ++i)
    {
        array<int,3>& p = nxt[node][i];
        if (p[0] != 0 & p[2-par])
        {
            bool neigRes = dfs(p[0], depth+1);
            if (par)
                res |= neigRes;
            else
                res &= neigRes;
        }
    }
    return res;
}
int main() 
{
    ios::sync_with_stdio(0), cin.tie(0);
    int n; cin >> n;
    string s;
    int MAXID = 0;
    while(n--)
    {
        cin >> s;
        int node = 0;
        for (char c : s)
        {
            array<int,3>& p = nxt[node][c-'a'];
            if (p[0] == 0)
                p[0] = ++MAXID;
            p[1] = 1;
            node = p[0];
        }        
    }
 
    int m; cin >> m;
    while(m--)
    {
        cin >> s;
        int node = 0;
        for (char c : s)
        {
            array<int,3>& p = nxt[node][c-'a'];
            if (p[0] == 0)
                p[0] = ++MAXID;
            p[2] = 1;
            node = p[0];
        }        
    }
    cout << (dfs(0, 1) ? "Nina" : "Emilija") << "\n";
}
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
