답안 #926166

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
926166 2024-02-12T16:12:14 Z samek08 Cards (LMIO19_korteles) C++14
36 / 100
1000 ms 4692 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a,b) for(int a = 0; a < (b); ++a)
#define all(t) t.begin(), t.end()
#define pb push_back

const int MAXN = 5e5+5;
int n = 0;
ll wyn = 0;
char A[4][MAXN];

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	cin >> n;
	rep(i,n) rep(j,4) cin >> A[j][i];

	rep(i,n)
	{
		rep(j,i)
		{
			bool ok = false;
			if(A[0][i] == A[2][j] and A[1][i] == A[3][j]) ok = true;
			if(A[2][i] == A[0][j] and A[3][i] == A[1][j]) ok = true;
			if(A[0][i] == A[1][j] and A[2][i] == A[3][j]) ok = true;
			if(A[1][i] == A[0][j] and A[3][i] == A[2][j]) ok = true;
			if(ok) ++wyn;
		}
	}

	cout << wyn << '\n';

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 460 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 460 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 8 ms 348 KB Output is correct
8 Correct 10 ms 504 KB Output is correct
9 Correct 19 ms 348 KB Output is correct
10 Correct 12 ms 496 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1018 ms 4692 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 1057 ms 860 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 8 ms 348 KB Output is correct
4 Correct 10 ms 504 KB Output is correct
5 Correct 19 ms 348 KB Output is correct
6 Correct 12 ms 496 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 460 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Execution timed out 1018 ms 4692 KB Time limit exceeded
13 Halted 0 ms 0 KB -