結果
| 問題 |
No.3286 Make a Happy Connection
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-03 21:21:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 49 ms / 2,000 ms |
| コード長 | 262 bytes |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 82,384 KB |
| 実行使用メモリ | 60,164 KB |
| 最終ジャッジ日時 | 2025-10-03 21:21:23 |
| 合計ジャッジ時間 | 2,502 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1):
a[i], a[i + 1] = a[i + 1], a[i]
for j in range(n - 1):
if a[j] == a[j + 1]:
print("Yes")
exit()
a[i], a[i + 1] = a[i + 1], a[i]
print("No")