結果

問題 No.274 The Wall
ユーザー mkawa2mkawa2
提出日時 2020-02-05 08:41:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 834 ms
コンパイル使用メモリ 11,852 KB
実行使用メモリ 10,068 KB
最終ジャッジ日時 2023-10-22 01:36:32
合計ジャッジ時間 3,016 ms
ジャッジサーバーID
(参考情報)
judge10 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 31 ms
9,884 KB
testcase_02 WA -
testcase_03 AC 32 ms
9,876 KB
testcase_04 WA -
testcase_05 AC 30 ms
9,876 KB
testcase_06 AC 30 ms
9,876 KB
testcase_07 AC 30 ms
9,876 KB
testcase_08 AC 30 ms
9,876 KB
testcase_09 AC 29 ms
9,876 KB
testcase_10 AC 32 ms
9,908 KB
testcase_11 AC 31 ms
9,924 KB
testcase_12 AC 33 ms
9,924 KB
testcase_13 AC 30 ms
9,892 KB
testcase_14 AC 31 ms
9,908 KB
testcase_15 AC 31 ms
9,912 KB
testcase_16 AC 32 ms
9,944 KB
testcase_17 AC 32 ms
9,920 KB
testcase_18 AC 32 ms
9,916 KB
testcase_19 AC 33 ms
9,920 KB
testcase_20 AC 33 ms
9,920 KB
testcase_21 AC 32 ms
9,920 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 32 ms
9,924 KB
testcase_25 AC 33 ms
9,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 6)
def MI(): return map(int, sys.stdin.readline().split())

def main():
    n,m=MI()
    b=[0]*(m+1)
    for _ in range(n):
        l,r=MI()
        b[l-1]+=1
        b[r]-=1
    for i in range(m):
        b[i+1]+=b[i]
        if b[i+1]>2:
            print("NO")
            break
    else:
        print("YES")

main()
0