답안 #339034

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
339034 2020-12-24T12:39:17 Z Nimbostratus Fishing Game (RMI19_fishing) C++17
0 / 100
3 ms 512 KB
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

ll ans;
int N,T;
const int MOD = 1e9 + 7;

int32_t main()
{
	//freopen("in","r",stdin);
	//freopen("out","w",stdout);
	cin >> N >> T;
	while(T--)
	{
		ans = 1;
		int lm = 0;
		for(int i=1;i<=3;i++)
		{
			bool added[105];
			memset(added,0,sizeof(added));
			for(int j=1;j<=2*N;j++)
			{
				int x;
				cin >> x;
				if(added[x])
				{
					lm--; continue;
				}
				else
				{
					lm++;
					added[x] = 1;
				}
			} 
		}
		lm /= 2;
		for(int i=1;i<=lm;i++) ans = (ans * i) % MOD;
		cout << ans << endl;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Incorrect 1 ms 384 KB Output isn't correct
5 Runtime error 2 ms 492 KB Execution killed with signal 6 (could be triggered by violating memory limits)
6 Runtime error 2 ms 492 KB Execution killed with signal 6 (could be triggered by violating memory limits)
7 Runtime error 2 ms 492 KB Execution killed with signal 6 (could be triggered by violating memory limits)
8 Runtime error 2 ms 512 KB Execution killed with signal 6 (could be triggered by violating memory limits)
9 Runtime error 3 ms 492 KB Execution killed with signal 6 (could be triggered by violating memory limits)
10 Runtime error 2 ms 492 KB Execution killed with signal 6 (could be triggered by violating memory limits)