結果
問題 | No.2210 equence Squence Seuence |
ユーザー | coder_So_hey |
提出日時 | 2023-02-10 22:01:24 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 692 bytes |
コンパイル時間 | 1,877 ms |
コンパイル使用メモリ | 87,052 KB |
実行使用メモリ | 107,652 KB |
最終ジャッジ日時 | 2023-09-21 23:16:34 |
合計ジャッジ時間 | 7,650 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | AC | 84 ms
71,176 KB |
testcase_02 | AC | 79 ms
71,544 KB |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | AC | 125 ms
88,104 KB |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | AC | 85 ms
71,152 KB |
testcase_10 | AC | 85 ms
71,348 KB |
testcase_11 | RE | - |
testcase_12 | AC | 89 ms
71,408 KB |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | AC | 80 ms
71,280 KB |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | RE | - |
ソースコード
N, K = map(int, input().split()) A = list(map(int, input().split())) order = [] minimum = 1 maximum = N i = 0 while i < N - 1: if A[i] < A[i + 1]: order.append(maximum) maximum -= 1 elif A[i] > A[i + 1]: order.append(minimum) minimum += 1 else: j = i + 1 while A[i] == A[j]: j += 1 for _ in range(j - i): if A[i] < A[j]: order.append(maximum) maximum -= 1 else: order.append(minimum) minimum += 1 i = j i += 1 order.append(maximum) for i in range(N): if order[i] != K: print(f"{A[i]}", end = " ")