結果

問題 No.1557 Binary Variable
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-06-25 21:30:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 495 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 108,492 KB
最終ジャッジ日時 2023-09-07 14:12:01
合計ジャッジ時間 16,574 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 255 ms
99,768 KB
testcase_01 AC 269 ms
102,320 KB
testcase_02 AC 68 ms
71,304 KB
testcase_03 AC 69 ms
71,340 KB
testcase_04 AC 343 ms
98,592 KB
testcase_05 AC 336 ms
98,748 KB
testcase_06 AC 326 ms
98,804 KB
testcase_07 AC 322 ms
98,648 KB
testcase_08 AC 378 ms
98,528 KB
testcase_09 AC 388 ms
98,552 KB
testcase_10 AC 419 ms
98,252 KB
testcase_11 AC 417 ms
98,588 KB
testcase_12 AC 376 ms
98,564 KB
testcase_13 AC 435 ms
98,224 KB
testcase_14 AC 460 ms
99,156 KB
testcase_15 AC 439 ms
98,232 KB
testcase_16 AC 450 ms
99,276 KB
testcase_17 AC 455 ms
99,524 KB
testcase_18 AC 445 ms
98,492 KB
testcase_19 AC 488 ms
107,388 KB
testcase_20 AC 495 ms
107,832 KB
testcase_21 AC 480 ms
108,228 KB
testcase_22 AC 473 ms
107,612 KB
testcase_23 AC 461 ms
108,144 KB
testcase_24 AC 476 ms
104,284 KB
testcase_25 AC 461 ms
105,312 KB
testcase_26 AC 457 ms
102,336 KB
testcase_27 AC 474 ms
101,660 KB
testcase_28 AC 478 ms
100,248 KB
testcase_29 AC 448 ms
99,504 KB
testcase_30 AC 476 ms
99,348 KB
testcase_31 AC 446 ms
99,488 KB
testcase_32 AC 448 ms
99,576 KB
testcase_33 AC 488 ms
108,492 KB
testcase_34 AC 70 ms
71,224 KB
testcase_35 AC 69 ms
71,436 KB
testcase_36 AC 69 ms
71,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
LR = [list(map(int,input().split())) for i in range(m)]
LR.sort(key=lambda x: x[1])
s = set()
done = -1
for l,r in LR:
    if done >= l:
        continue
    s.add(r)
    done = r
print(n-len(s))
0