結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-29 19:21:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 5,000 ms |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 330 ms |
| コンパイル使用メモリ | 82,708 KB |
| 実行使用メモリ | 59,520 KB |
| 最終ジャッジ日時 | 2026-01-29 19:21:03 |
| 合計ジャッジ時間 | 2,752 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")