답안 #104698

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
104698 2019-04-08T21:45:45 Z Shtef Dijamant (COI16_dijament) C++14
27 / 100
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;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 412 ms 39020 KB Output isn't correct
2 Halted 0 ms 0 KB -