結果
問題 | No.1675 Strange Minimum Query |
ユーザー | Tsubajiro |
提出日時 | 2022-07-02 20:20:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 541 bytes |
コンパイル時間 | 1,043 ms |
コンパイル使用メモリ | 86,448 KB |
実行使用メモリ | 110,380 KB |
最終ジャッジ日時 | 2023-08-18 12:26:37 |
合計ジャッジ時間 | 15,564 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
75,472 KB |
testcase_01 | AC | 72 ms
70,952 KB |
testcase_02 | AC | 73 ms
71,328 KB |
testcase_03 | AC | 666 ms
101,564 KB |
testcase_04 | AC | 520 ms
96,980 KB |
testcase_05 | AC | 117 ms
78,828 KB |
testcase_06 | AC | 708 ms
105,892 KB |
testcase_07 | AC | 730 ms
106,764 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
ソースコード
N, Q = list(map(int, input().split())) B = [] ans = [0]*N for _ in range(Q): l,r,b = list(map(int, input().split())) B.append([b,l,r]) same = set() B.sort(reverse=True) for i in range(Q): b,l,r = B[i] flag=False for j in range(l-1,r): if ans[j]: if b in same: flag=True continue else: ans[j]=b flag=True if not flag: print(-1) exit() same.add(b) for i in range(N): if ans[i]==0: ans[i]=10**10 print(*ans)