# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
104698 |
2019-04-08T21:45:45 Z |
Shtef |
Dijamant (COI16_dijament) |
C++14 |
|
412 ms |
39020 KB |
#include <iostream>
#include <map>
#include <vector>
using namespace std;
map <string, bool> m;
map <string, map <string, bool> > svi;
int n;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for(int i = 0 ; i < n ; ++i){
string s;
cin >> s;
char poc;
cin >> poc;
map <string, bool> ovaj;
while(1){
string x;
cin >> x;
if(x == ";")
break;
ovaj[x] = 1;
}
if(m.find(s) != m.end()){
cout << "greska" << endl;
continue;
}
bool p = 1;
for(map <string, bool>::iterator j = ovaj.begin() ; j != ovaj.end() ; ++j){
string x = j->first;
if(m.find(x) == m.end()){
p = 0;
break;
}
}
if(!p){
cout << "greska" << endl;
continue;
}
cout << "ok" << endl;
m[s] = 1;
svi[s] = ovaj;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
512 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
3 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
512 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
3 ms |
384 KB |
Output is correct |
5 |
Correct |
3 ms |
384 KB |
Output is correct |
6 |
Correct |
5 ms |
768 KB |
Output is correct |
7 |
Correct |
4 ms |
512 KB |
Output is correct |
8 |
Correct |
2 ms |
384 KB |
Output is correct |
9 |
Correct |
3 ms |
384 KB |
Output is correct |
10 |
Correct |
4 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
512 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
3 ms |
384 KB |
Output is correct |
5 |
Correct |
3 ms |
384 KB |
Output is correct |
6 |
Correct |
5 ms |
768 KB |
Output is correct |
7 |
Correct |
4 ms |
512 KB |
Output is correct |
8 |
Correct |
2 ms |
384 KB |
Output is correct |
9 |
Correct |
3 ms |
384 KB |
Output is correct |
10 |
Correct |
4 ms |
384 KB |
Output is correct |
11 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
412 ms |
39020 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |