結果
問題 | No.1021 Children in Classrooms |
ユーザー | suzu |
提出日時 | 2023-05-30 13:33:14 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 708 bytes |
コンパイル時間 | 4,241 ms |
コンパイル使用メモリ | 110,136 KB |
実行使用メモリ | 24,000 KB |
最終ジャッジ日時 | 2023-08-28 00:34:20 |
合計ジャッジ時間 | 9,645 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 62 ms
21,912 KB |
testcase_01 | AC | 62 ms
21,860 KB |
testcase_02 | AC | 62 ms
21,780 KB |
testcase_03 | AC | 73 ms
21,888 KB |
testcase_04 | AC | 75 ms
24,000 KB |
testcase_05 | AC | 74 ms
21,964 KB |
testcase_06 | AC | 74 ms
21,952 KB |
testcase_07 | AC | 76 ms
22,208 KB |
testcase_08 | AC | 76 ms
22,084 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; namespace yukicoder { class pg { static void Main(string[] args) { var line = Console.ReadLine().Split(' ').Select(c => int.Parse(c)).ToList(); int N = line[0]; int M = line[1]; var nums = Console.ReadLine().Split(' ').Select(c => int.Parse(c)).ToList(); string S = Console.ReadLine(); for(int i = 0;i < M;i++) { if(S[i] == 'R') { nums[N - 2] += nums[N - 1]; nums.RemoveAt(N - 1); nums.Insert(0,0); }else { nums[1] += nums[0]; nums.RemoveAt(0); nums.Insert(N - 1,0); } } foreach(int i in nums) { Console.Write(i + " "); } } } }