結果

問題 No.1557 Binary Variable
ユーザー ああいいああいい
提出日時 2021-12-26 10:54:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 900 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 11,780 KB
実行使用メモリ 37,468 KB
最終ジャッジ日時 2023-10-24 01:00:38
合計ジャッジ時間 33,331 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 665 ms
36,632 KB
testcase_01 AC 652 ms
33,464 KB
testcase_02 AC 29 ms
10,112 KB
testcase_03 AC 28 ms
10,112 KB
testcase_04 AC 768 ms
35,328 KB
testcase_05 AC 768 ms
35,720 KB
testcase_06 AC 742 ms
34,192 KB
testcase_07 AC 754 ms
35,284 KB
testcase_08 AC 836 ms
36,808 KB
testcase_09 AC 838 ms
37,460 KB
testcase_10 AC 889 ms
37,264 KB
testcase_11 AC 886 ms
37,280 KB
testcase_12 AC 815 ms
37,276 KB
testcase_13 AC 881 ms
37,276 KB
testcase_14 AC 874 ms
37,352 KB
testcase_15 AC 885 ms
37,292 KB
testcase_16 AC 885 ms
37,356 KB
testcase_17 AC 873 ms
37,344 KB
testcase_18 AC 878 ms
37,356 KB
testcase_19 AC 864 ms
37,356 KB
testcase_20 AC 875 ms
37,364 KB
testcase_21 AC 872 ms
37,356 KB
testcase_22 AC 865 ms
37,352 KB
testcase_23 AC 882 ms
37,352 KB
testcase_24 AC 886 ms
37,468 KB
testcase_25 AC 890 ms
37,356 KB
testcase_26 AC 875 ms
37,356 KB
testcase_27 AC 900 ms
37,356 KB
testcase_28 AC 881 ms
37,464 KB
testcase_29 AC 881 ms
37,368 KB
testcase_30 AC 880 ms
37,356 KB
testcase_31 AC 883 ms
37,368 KB
testcase_32 AC 885 ms
37,356 KB
testcase_33 AC 872 ms
37,452 KB
testcase_34 AC 28 ms
10,112 KB
testcase_35 AC 28 ms
10,112 KB
testcase_36 AC 28 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())

dat = [0] * M
for _ in range(M):
    l,r = map(int,input().split())
    dat[_] = (r,l)
dat.sort(reverse = True)
count = 0
now = 0
while len(dat):
    r,l = dat.pop()
    if l > now:
        count += 1
        now = r
print(N - count)
0