Submission #94995

#TimeUsernameProblemLanguageResultExecution timeMemory
94995karlopuhZamjena (COCI18_zamjena)C++14
14 / 70
6 ms1012 KiB
#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 (stderr)

zamjena.cpp: In function 'int main()':
zamjena.cpp:13:5: warning: statement has no effect [-Wunused-value]
   ul;
     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...