結果
問題 | No.1557 Binary Variable |
ユーザー |
![]() |
提出日時 | 2021-06-27 16:36:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 258 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 82,200 KB |
実行使用メモリ | 88,640 KB |
最終ジャッジ日時 | 2024-06-25 11:51:10 |
合計ジャッジ時間 | 9,448 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 31 |
ソースコード
n, m = map(int, input().split())LR = []for i in range(m):l, r = map(int, input().split())l, r = l-1, r-1LR.append((l, r))LR.sort()cnt = 0curR = -1for l, r in LR:if l <= curR:continuecurR = rcnt += 1print(n-cnt)