結果
問題 | No.504 ゲーム大会(ランキング) |
ユーザー | iad_2889 |
提出日時 | 2019-05-18 07:07:12 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 315 ms / 2,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 11,764 KB |
実行使用メモリ | 17,244 KB |
最終ジャッジ日時 | 2023-10-17 07:31:08 |
合計ジャッジ時間 | 3,900 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
10,096 KB |
testcase_01 | AC | 29 ms
10,096 KB |
testcase_02 | AC | 30 ms
10,096 KB |
testcase_03 | AC | 29 ms
10,096 KB |
testcase_04 | AC | 30 ms
10,096 KB |
testcase_05 | AC | 31 ms
10,096 KB |
testcase_06 | AC | 30 ms
10,096 KB |
testcase_07 | AC | 313 ms
17,244 KB |
testcase_08 | AC | 307 ms
17,244 KB |
testcase_09 | AC | 306 ms
17,244 KB |
testcase_10 | AC | 305 ms
17,244 KB |
testcase_11 | AC | 310 ms
17,244 KB |
testcase_12 | AC | 315 ms
17,244 KB |
testcase_13 | AC | 308 ms
17,244 KB |
testcase_14 | AC | 312 ms
17,244 KB |
ソースコード
def next_player(num): current = 0 while True: yield current current+=1 current%=num N = int(input()) np = next_player(N) plays = map(int,[input() for x in range(N)]) k_score = 0 k_rank = 1 for play in plays: current = next(np) if current: if play > k_score: k_rank+=1 else: k_score = play print(k_rank)