結果
| 問題 | 
                            No.1026 OGAWA's New Keyboard
                             | 
                    
| ユーザー | 
                             akakimidori
                         | 
                    
| 提出日時 | 2020-04-14 16:46:08 | 
| 言語 | Rust  (1.83.0 + proconio)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 9 ms / 1,000 ms | 
| コード長 | 634 bytes | 
| コンパイル時間 | 12,708 ms | 
| コンパイル使用メモリ | 404,072 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-16 05:00:38 | 
| 合計ジャッジ時間 | 13,868 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 21 | 
ソースコード
use std::io::Read;
fn run() {
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();
    let mut it = s.trim().split_whitespace();
    let n: usize = it.next().unwrap().parse().unwrap();
    let mut deq = std::collections::VecDeque::new();
    for _ in 0..n {
        let op: usize = it.next().unwrap().parse().unwrap();
        let c: char = it.next().unwrap().chars().next().unwrap();
        if op == 0 {
            deq.push_back(c);
        } else {
            deq.push_front(c);
        }
    }
    let ans: String = deq.into_iter().collect();
    println!("{}", ans);
}
fn main() {
    run();
}
            
            
            
        
            
akakimidori