結果

問題 No.1557 Binary Variable
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2021-06-26 18:53:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,099 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 38,656 KB
最終ジャッジ日時 2023-09-07 15:28:15
合計ジャッジ時間 34,008 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 651 ms
37,764 KB
testcase_01 AC 638 ms
34,716 KB
testcase_02 AC 15 ms
7,920 KB
testcase_03 AC 15 ms
7,880 KB
testcase_04 AC 830 ms
36,492 KB
testcase_05 AC 826 ms
36,296 KB
testcase_06 AC 794 ms
35,436 KB
testcase_07 AC 803 ms
36,048 KB
testcase_08 AC 914 ms
38,032 KB
testcase_09 AC 928 ms
38,112 KB
testcase_10 AC 993 ms
38,488 KB
testcase_11 AC 995 ms
38,504 KB
testcase_12 AC 907 ms
38,052 KB
testcase_13 AC 989 ms
38,396 KB
testcase_14 AC 1,015 ms
38,460 KB
testcase_15 AC 1,008 ms
38,440 KB
testcase_16 AC 1,026 ms
38,588 KB
testcase_17 AC 1,057 ms
38,520 KB
testcase_18 AC 1,068 ms
38,560 KB
testcase_19 AC 1,016 ms
38,580 KB
testcase_20 AC 1,039 ms
38,532 KB
testcase_21 AC 1,023 ms
38,652 KB
testcase_22 AC 1,027 ms
38,524 KB
testcase_23 AC 1,015 ms
38,524 KB
testcase_24 AC 1,019 ms
38,596 KB
testcase_25 AC 1,099 ms
38,508 KB
testcase_26 AC 1,049 ms
38,520 KB
testcase_27 AC 1,042 ms
38,452 KB
testcase_28 AC 1,064 ms
38,468 KB
testcase_29 AC 1,052 ms
38,656 KB
testcase_30 AC 1,071 ms
38,584 KB
testcase_31 AC 1,010 ms
38,588 KB
testcase_32 AC 1,035 ms
38,528 KB
testcase_33 AC 1,005 ms
38,632 KB
testcase_34 AC 15 ms
7,764 KB
testcase_35 AC 15 ms
7,748 KB
testcase_36 AC 14 ms
7,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
R = [[]]*M
for i in range(M):
  l,r = map(int,input().split())
  R[i] = [r+1,l]
  
R.sort()
ans=0
con_l=0
for i in range(M):
    if con_l <= R[i][1]:
        ans += 1
        con_l = R[i][0]
print(N-ans)
0