제출 #1344301

#제출 시각아이디문제언어결과실행 시간메모리
1344301gkos5678Dijamant (COI16_dijament)C++20
27 / 100
52 ms552 KiB
#include <bits/stdc++.h>
using namespace std;

#define pb push_back

typedef vector<string> vstr;

int n;
map<string, int> m;
vstr vp;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    cin >> n;
    for (int i = 0; i < n; i++){
        string k, dv, p;
        cin >> k >> dv;
        bool ok = (m[k] == 0);
        vp.clear();
        while(true){
            cin >> p;
            if (p == ";") break;
            vp.pb(p);
            ok &= (m[p] == 1);
        }
        if (!ok){
            cout << "greska\n";
            continue;
        }
        cout << "ok\n";
        m[k] = 1;
    }
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...