답안 #150478

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
150478 2019-09-01T08:29:34 Z Outfraware Boat People(#3577, c4big, bsyo2k, cepiloth) 함수컵 박물관 (FXCUP4_museum) C++17
0 / 100
6 ms 384 KB
#include "museum.h"

bool table[102][102];

long long CountSimilarPairs(std::vector<int> B, std::vector<int> T, std::vector<int> G) {
	int N = B.size();

	int sol = 0;
	for (int i = 0; i < N; i++) {
		int candB = B[i];
		int candT = T[i];
		int candG = G[i];

		for (int j = i+1; j < N; j++) {
			// ������ continue
			if (i == j) {
				continue;
			}

			if (candB == B[j] || candT == T[j] || candG == G[j]) {
				// �湮�ߴٸ�
				if (table[i][j] == 1 && table[j][i] == 1) {
					continue;
				}

				table[i][j] = table[j][i] = 1;
				sol++;
			}
		}
	}

	return sol;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Runtime error 6 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Runtime error 6 ms 384 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Halted 0 ms 0 KB -