# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
94995 | 2019-01-26T14:57:15 Z | karlopuh | Zamjena (COCI18_zamjena) | C++14 | 6 ms | 1012 KB |
#include <bits/stdc++.h> using namespace std; vector<string> polje; int n; string ul; map <string,string> mapa; int main(){ cin>>n; for(int i=0;i<n;i++){ ul; cin>>ul; polje.push_back(ul); } for(int i=0;i<n;i++){ cin>>ul; if(ul==polje[i])continue; else if(ul[0] >= '0' && ul[0]<='9'){ if(polje[i][0] >='0' && polje[i][0]<='9'){ cout<<"NE"; return 0; }else{ mapa[polje[i]]=ul; } }else if(polje[i][0]>='0' && polje[i][0]<='9'){ if(mapa[ul].empty())mapa[ul]=polje[i]; else if(mapa[ul]!=polje[i]){ cout<<"NE"; return 0; } } } cout<<"DA"; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 352 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 256 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Incorrect | 2 ms | 256 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 504 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Incorrect | 3 ms | 632 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 1012 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |