結果
問題 | No.2615 ペアの作り方 |
ユーザー |
|
提出日時 | 2024-01-26 21:29:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 303 ms / 2,000 ms |
コード長 | 576 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 82,252 KB |
実行使用メモリ | 151,680 KB |
最終ジャッジ日時 | 2024-09-28 07:41:54 |
合計ジャッジ時間 | 5,212 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random#sys.setrecursionlimit(10**9)#sys.set_int_max_str_digits(0)#input = sys.stdin.readlinen = int(input())mod = 998244353x = list(map(int,input().split()))y = list(map(int,input().split()))z = x + yz.sort()xx = set(x)yy = set(y)xxx = 0yyy = 0for i in range(n):if z[i] in xx:xxx += 1else:yyy += 1zzz = max(xxx,yyy)ans = 1for i in range(1,zzz+1):if i <= xxx:ans *= iif i <= yyy:ans *= ians %= modprint(ans)