結果
問題 | No.1109 調の判定 |
ユーザー |
|
提出日時 | 2021-06-05 02:58:53 |
言語 | PyPy2 (7.3.15) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 2,235 ms |
コンパイル使用メモリ | 76,416 KB |
実行使用メモリ | 75,904 KB |
最終ジャッジ日時 | 2024-11-20 17:58:35 |
合計ジャッジ時間 | 6,550 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
#!/usr/bin/python #coding:utf-8 #CodeIQ "Detect Music Key"やらCheckiO "Rotate Hole"やらで既出.此方の関数はCheckiOのコピー. rotate=lambda state,pipe_numbers: [i for i in range(len(state)) if all(state[j%len(state)] or (i+j)%len(state) not in set(pipe_numbers) for j in range(len(state)))] if __name__=='__main__': state=[1,0,1,0,1,1,0,1,0,1,0,1] import sys r=rotate(state,[int(e) for e in sys.stdin.read().split()[1:]]) print(r[0] if len(r)==1 else -1)