結果

問題 No.3141 Balancing with X=>O Flip
コンテスト
ユーザー あるふぁ
提出日時 2026-08-27 14:21:26
言語 Rust
(1.97.1 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
+ 741µs
コード長 263 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,927 ms
コンパイル使用メモリ 183,920 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-08-27 14:21:35
合計ジャッジ時間 3,598 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use proconio::{input, marker::Chars};

fn main(){
    input!{
        _n: usize,
        s: Chars,
    }

    let l = s.iter().filter(|x| **x == '(').count();
    let r = s.iter().filter(|x| **x == ')').count();
    println!("{}", if l == r{"Yes"} else{"No"});
}
0