結果
問題 |
No.116 門松列(1)
|
ユーザー |
|
提出日時 | 2017-08-08 23:29:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 193 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-12 00:18:28 |
合計ジャッジ時間 | 1,677 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 2 WA * 19 |
ソースコード
import itertools input() ary = list(map(int, input().split())) ans = 0 for i in range(len(ary) - 2): tmp = ary[i:i + 3] dup = False for j in itertools.combinations(tmp, 2): if(j[0] == j[1]): sup = True if(not dup): tmp[tmp.index(max(tmp))] = 0 if(tmp.index(max(tmp)) == 0 or tmp.index(max(tmp)) == 1): ans += 1 print(ans)