Submission #502614

# Submission time Handle Problem Language Result Execution time Memory
502614 2022-01-06T10:48:59 Z lukxAed Cards (LMIO19_korteles) C++14
0 / 100
1000 ms 14556 KB
#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];
            string da=""+s[0]+s[2], db=""+s[1]+s[3], dc=""+t[0]+t[2], dd=""+t[1]+t[3];
            
            if(s.substr(2,3)==t.substr(0,2))
            {
                rj++;
            }
            else if(s.substr(0,2)==t.substr(2,3))
            {
                rj++;
            }
            else if(da==dd)
            {
                rj++;
            }
            else if(db==dc)
            {
                rj++;
            }
        }
    }
    cout<<rj;
}
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14540 KB Output is correct
2 Incorrect 7 ms 14556 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14540 KB Output is correct
2 Incorrect 7 ms 14556 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1085 ms 14540 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 14540 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 14540 KB Output isn't correct