結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-29 19:21:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 5,000 ms |
| + 407µs | |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 96,240 KB |
| 実行使用メモリ | 81,792 KB |
| 最終ジャッジ日時 | 2026-07-20 23:32:02 |
| 合計ジャッジ時間 | 3,518 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
N = int(input())
S = input().strip()
if N==1:
print("NO")
elif N==2:
if S=="01" or S=="10":
print("NO")
else:
print("YES")
elif N==3:
if S=="010" or S=="101":
print("NO")
else:
print("YES")
else:
print("YES")