結果
問題 |
No.3262 水色コーダーさん、その問題d問題ですよ?(1<=d<=N)
|
ユーザー |
👑 |
提出日時 | 2025-09-03 21:52:48 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 82,836 KB |
実行使用メモリ | 69,628 KB |
最終ジャッジ日時 | 2025-09-03 21:52:52 |
合計ジャッジ時間 | 3,164 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 WA * 4 |
ソースコード
from itertools import permutations N = int(input()) L, R = [], [] for _ in range(N): l, r = map(int, input().split()) L.append(l) R.append(r) ans = 0 for perm in permutations(range(N)): curr = 0 for p in perm: curr = max(curr + 1, L[p]) if curr > R[p]: break else: ans += 1 print(ans)