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;
set<string> st;
int main()
{
int n;
cin >> n;
for(int i = 0; i < n; i ++)
{
string k;
cin >> k;
string temp; cin >> temp;
bool ok = true;
ok &= (st.find(k) == st.end());
while(true)
{
cin >> temp;
if(temp == ";")
break;
if(st.find(temp) == st.end())
ok = false;
}
if(ok)
{
st.insert(k);
cout << "ok\n";
}
else
cout << "greska\n";
}
return 0;
}
# | 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... |