結果
問題 |
No.1026 OGAWA's New Keyboard
|
ユーザー |
![]() |
提出日時 | 2025-04-07 09:31:03 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 901 ms / 1,000 ms |
コード長 | 626 bytes |
コンパイル時間 | 8,225 ms |
コンパイル使用メモリ | 170,968 KB |
実行使用メモリ | 188,568 KB |
最終ジャッジ日時 | 2025-04-07 09:31:15 |
合計ジャッジ時間 | 10,471 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (136 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); List<char> list = new List<char>(); for (int i = 0; i < n; i++) { string[] str = Console.ReadLine().Split(' '); list = SetList(list, int.Parse(str[0]), char.Parse(str[1])); } Console.Write(String.Join("", list)); } private static List<char> SetList(List<char> list, int v1, char v2) { if(v1 == 0) { list.Add(v2); } else { list.Insert(0, v2); } return list; } }