답안 #502556

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
502556 2022-01-06T08:44:13 Z lukxAed Cards (LMIO19_korteles) C++14
0 / 100
1000 ms 17244 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];
            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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 14600 KB Output is correct
2 Correct 7 ms 14540 KB Output is correct
3 Incorrect 7 ms 14592 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 14600 KB Output is correct
2 Correct 7 ms 14540 KB Output is correct
3 Incorrect 7 ms 14592 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1092 ms 17244 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 14604 KB Output is correct
2 Execution timed out 1081 ms 14796 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 14604 KB Output is correct
2 Correct 7 ms 14600 KB Output is correct
3 Correct 7 ms 14540 KB Output is correct
4 Incorrect 7 ms 14592 KB Output isn't correct
5 Halted 0 ms 0 KB -