Submission #990703

#TimeUsernameProblemLanguageResultExecution timeMemory
990703vjudge1Dijamant (COI16_dijament)C++17
27 / 100
114 ms348 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...