Submission #502556

#TimeUsernameProblemLanguageResultExecution timeMemory
502556lukxAedCards (LMIO19_korteles)C++14
0 / 100
1092 ms17244 KiB
#include <bits/stdc++.h> using namespace std; int N,rj; string a,b; string karte[456976]; int main() { cin>>N; for(int i=0;i<N;i++) { cin>>a>>b; karte[i]=a+b; } for(int i=0;i<N;i++) { for(int j=i+1;j<N;j++) { string s=karte[i]; string t=karte[j]; if(s.substr(2,3)==t.substr(0,1)) rj++; else if(s.substr(0,1)==t.substr(2,3)) rj++; else if((s[1]+s[3])==(t[0]+t[2])) rj++; else if((s[0]+s[2])==(t[1]+t[3])) rj++; } } cout<<rj; }
#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...