結果
| 問題 | 
                            No.1026 OGAWA's New Keyboard
                             | 
                    
| ユーザー | 
                             CELICA
                         | 
                    
| 提出日時 | 2020-06-23 22:10:59 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 40 ms / 1,000 ms | 
| コード長 | 493 bytes | 
| コンパイル時間 | 1,787 ms | 
| コンパイル使用メモリ | 172,748 KB | 
| 実行使用メモリ | 10,112 KB | 
| 最終ジャッジ日時 | 2024-07-03 19:32:40 | 
| 合計ジャッジ時間 | 2,806 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 21 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    deque<string> q;
    for (int i = 0; i < n; ++i)
    {
        int f;
        string s;
        cin >> f >> s;
        if (f == 0)
            q.push_back(s);
        else
            q.push_front(s);
    }
    while (q.size())
    {
        printf("%s", q.front().c_str());
        q.pop_front();
    }
    printf("\n");
    
    return 0;
}
            
            
            
        
            
CELICA