답안 #148502

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148502 2019-09-01T04:33:44 Z (παρα)γεμιστά(#3619, cfalas, ctziapo, Charis02) 함수컵 박물관 (FXCUP4_museum) C++17
27 / 100
1000 ms 1152 KB
#include<bits/stdc++.h>
#include "museum.h"
using namespace std;

long long CountSimilarPairs(std::vector<int> B, std::vector<int> T, std::vector<int> G) {
	int n = B.size();
	int ans=0;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(i==j) continue;
			//cout<<B[i]<<" "<<B[j]<<endl;
			if(B[i]==B[j] || T[i]==T[j] || G[i]==G[j]){
				ans++;
			}
		}
	}
	return ans/2;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 7 ms 384 KB Output is correct
7 Correct 7 ms 384 KB Output is correct
8 Correct 26 ms 384 KB Output is correct
9 Correct 15 ms 256 KB Output is correct
10 Correct 15 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 7 ms 384 KB Output is correct
7 Correct 7 ms 384 KB Output is correct
8 Correct 26 ms 384 KB Output is correct
9 Correct 15 ms 256 KB Output is correct
10 Correct 15 ms 384 KB Output is correct
11 Correct 77 ms 512 KB Output is correct
12 Execution timed out 1099 ms 1152 KB Time limit exceeded
13 Halted 0 ms 0 KB -