結果

問題 No.2779 Don't make Pair
コンテスト
ユーザー いまり💣🍠
提出日時 2024-06-07 22:30:31
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 501 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 71 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 112,184 KB
最終ジャッジ日時 2026-10-08 05:56:39
合計ジャッジ時間 28,529 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 17 WA * 3 TLE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
A = list(map(int, input().split()))

found_num = []
j_list = []

j = 0
while j < N - 1:
    if A[j] in found_num:
        break
    else:
        found_num.append(A[j])
        j_list.append(j + 1)
    j += 1

found_num2 = []

while j < N:
    if A[j] in found_num:
        index = found_num.index(A[j])
        j_list = j_list[index:]
    if A[j] in found_num2:
        j_list = []
        break
    else:
        found_num2.append(A[j])
    j += 1

print(len(j_list))
print(*j_list)
0