結果

問題 No.1026 OGAWA's New Keyboard
ユーザー curryudon08curryudon08
提出日時 2020-07-10 18:18:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 134 ms / 1,000 ms
コード長 741 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 110,496 KB
実行使用メモリ 30,464 KB
最終ジャッジ日時 2024-04-19 10:24:25
合計ジャッジ時間 2,756 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
18,048 KB
testcase_01 AC 21 ms
18,048 KB
testcase_02 AC 22 ms
18,048 KB
testcase_03 AC 23 ms
18,176 KB
testcase_04 AC 134 ms
30,464 KB
testcase_05 AC 26 ms
18,804 KB
testcase_06 AC 27 ms
19,044 KB
testcase_07 AC 94 ms
26,624 KB
testcase_08 AC 25 ms
18,688 KB
testcase_09 AC 22 ms
17,920 KB
testcase_10 AC 24 ms
18,176 KB
testcase_11 AC 23 ms
18,176 KB
testcase_12 AC 23 ms
18,176 KB
testcase_13 AC 21 ms
17,920 KB
testcase_14 AC 22 ms
18,048 KB
testcase_15 AC 22 ms
18,048 KB
testcase_16 AC 23 ms
17,920 KB
testcase_17 AC 50 ms
23,552 KB
testcase_18 AC 22 ms
18,304 KB
testcase_19 AC 48 ms
23,552 KB
testcase_20 AC 23 ms
18,304 KB
testcase_21 AC 22 ms
17,920 KB
testcase_22 AC 23 ms
18,048 KB
testcase_23 AC 24 ms
17,920 KB
testcase_24 AC 79 ms
26,240 KB
testcase_25 AC 25 ms
18,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;

namespace _1026
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = long.Parse(Console.ReadLine());

            var head = new List<string>();
            var tail = new List<string>();

            for(var i = 0; i < n; i++){
                var _ = Console.ReadLine().Split();
                var t = int.Parse(_[0]);
                var s = _[1];

                if(t == 0){
                    tail.Add(s);
                }else{
                    head.Add(s);
                }
            }

            head.Reverse();
            var o = string.Join("",head) + string.Join("",tail);

            Console.WriteLine(o);
        }
    }
}
0