Submission #990703

# Submission time Handle Problem Language Result Execution time Memory
990703 2024-05-31T04:45:27 Z vjudge1 Dijamant (COI16_dijament) C++17
27 / 100
114 ms 348 KB
#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
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Incorrect 0 ms 348 KB Output isn't correct
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 114 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -