| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 339034 | Nimbostratus | Fishing Game (RMI19_fishing) | C++17 | 3 ms | 512 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
	}
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
