結果
問題 |
No.241 出席番号(1)
|
ユーザー |
|
提出日時 | 2015-07-11 00:36:50 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 731 bytes |
コンパイル時間 | 449 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-08 02:28:19 |
合計ジャッジ時間 | 5,596 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 29 |
ソースコード
N = int(raw_input()) A = [int(raw_input()) for i in xrange(N)] if N in hist[:N]: print -1 exit() priority = sorted([[h, i] for i, h in enumerate(hist[:N])], reverse = True) used = [False] * N ans = [-1] * N for h, i in priority: for j in xrange(N): if A[j] != i and not used[j]: ans[j] = i used[j] = True break else: for j in xrange(N): if not used[j]: ans[j] = i used[j] = True break if -1 not in ans: for a in ans: print a else: print -1