結果
問題 | No.2615 ペアの作り方 |
ユーザー |
|
提出日時 | 2024-01-26 21:29:38 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 575 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 158,304 KB |
最終ジャッジ日時 | 2024-09-28 07:41:25 |
合計ジャッジ時間 | 6,262 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 TLE * 1 -- * 5 |
ソースコード
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 x: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)