結果
| 問題 | No.290 1010 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-06-22 10:34:56 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 620 bytes | 
| コンパイル時間 | 12,115 ms | 
| コンパイル使用メモリ | 402,428 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-03 18:38:04 | 
| 合計ジャッジ時間 | 13,313 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
//TODO
fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n: usize = n.trim().parse().unwrap();
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    let s: &str = s.trim();
    if n == 1 {
        println!("NO");
    } else if n == 2 {
        if s == "00" || s == "11" {
            println!("YES");
        } else {
            println!("NO");
        }
    } else if n == 3 {
        if s == "010" || s == "101" {
            println!("NO");
        } else {
            println!("YES");
        }
    } else {
        println!("YES");
    }
}
            
            
            
        