結果
| 問題 |
No.116 門松列(1)
|
| コンテスト | |
| ユーザー |
ohana
|
| 提出日時 | 2023-10-20 11:38:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 259 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 81,988 KB |
| 実行使用メモリ | 54,596 KB |
| 最終ジャッジ日時 | 2024-09-20 07:10:54 |
| 合計ジャッジ時間 | 1,883 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 4 WA * 17 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
cnt = 0
for i in range(n - 2):
a, b, c = A[i : i + 3]
B = sorted(A[i : i + 3])
if a != b and b != c and c != a and (a == B[1] or c == B[1]):
print(a, b, c)
cnt += 1
print(cnt)
ohana