結果

問題 No.1557 Binary Variable
ユーザー pluto77pluto77
提出日時 2021-06-26 09:09:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 517 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 426 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 109,980 KB
最終ジャッジ日時 2023-09-07 15:17:42
合計ジャッジ時間 17,341 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 268 ms
98,856 KB
testcase_01 AC 276 ms
104,080 KB
testcase_02 AC 68 ms
71,476 KB
testcase_03 AC 69 ms
71,476 KB
testcase_04 AC 352 ms
100,372 KB
testcase_05 AC 355 ms
100,388 KB
testcase_06 AC 342 ms
100,256 KB
testcase_07 AC 340 ms
100,180 KB
testcase_08 AC 392 ms
100,244 KB
testcase_09 AC 417 ms
100,196 KB
testcase_10 AC 441 ms
100,444 KB
testcase_11 AC 438 ms
100,216 KB
testcase_12 AC 393 ms
99,980 KB
testcase_13 AC 453 ms
99,848 KB
testcase_14 AC 479 ms
100,632 KB
testcase_15 AC 463 ms
99,940 KB
testcase_16 AC 480 ms
100,796 KB
testcase_17 AC 462 ms
100,008 KB
testcase_18 AC 458 ms
100,180 KB
testcase_19 AC 506 ms
108,808 KB
testcase_20 AC 509 ms
109,440 KB
testcase_21 AC 514 ms
109,584 KB
testcase_22 AC 509 ms
108,916 KB
testcase_23 AC 512 ms
109,588 KB
testcase_24 AC 503 ms
105,796 KB
testcase_25 AC 510 ms
106,860 KB
testcase_26 AC 497 ms
104,008 KB
testcase_27 AC 495 ms
103,272 KB
testcase_28 AC 493 ms
101,744 KB
testcase_29 AC 477 ms
100,980 KB
testcase_30 AC 476 ms
101,256 KB
testcase_31 AC 479 ms
101,044 KB
testcase_32 AC 465 ms
101,192 KB
testcase_33 AC 517 ms
109,980 KB
testcase_34 AC 73 ms
71,568 KB
testcase_35 AC 71 ms
71,420 KB
testcase_36 AC 69 ms
71,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1557
n,m=map(int,input().split())
lr=[list(map(int,input().split())) for i in range(m)]
res=n
t=-1
for l,r in sorted(lr,key=lambda x: x[1]):
 if l<=t<=r:
  continue
 res-=1
 t=r
print(res)
0