This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = (int)1e2 + 1;
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
int n;
cin >> n;
vector<int> E[n];
map<string, int> m;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
vector<int> v;
bool tr = (m.find(s) == m.end());
while (true) {
string t;
cin >> t;
if (t == ";") break;
if (!tr || t == ":") continue;
tr = (m.find(t) != m.end());
}
if (!tr) cout << "greska\n";
else {
cout << "ok\n";
m[s] = (int)m.size();
}
}
}
# | 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... |