結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-29 19:21:00 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 39 ms / 5,000 ms |
| + 236µs | |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 64,220 KB |
| 実行使用メモリ | 56,464 KB |
| 最終ジャッジ日時 | 2026-10-28 21:14:38 |
| 合計ジャッジ時間 | 2,835 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
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")