結果
| 問題 | No.3262 水色コーダーさん、その問題d問題ですよ?(1<=d<=N) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-06 14:05:59 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 2,000 ms |
| + 332µs | |
| コード長 | 344 bytes |
| 記録 | |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 95,972 KB |
| 実行使用メモリ | 84,352 KB |
| 最終ジャッジ日時 | 2026-07-14 19:55:20 |
| 合計ジャッジ時間 | 3,666 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
from itertools import permutations
n = int(input())
prob = [list(map(int, input().split())) for _ in range(n)]
cnt = 0
for p in permutations([i for i in range(n)]):
x = prob[p[0]][0]
for i in range(1, n):
if x > prob[p[i]][1]:
break
x = max(x, prob[p[i]][0])
else:
cnt += 1
print(cnt)