結果

問題 No.935 う し た ぷ に き あ く ん 笑 ビ - ム
ユーザー tsushimatsushima
提出日時 2019-11-29 22:26:58
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,058 bytes
コンパイル時間 1,025 ms
コンパイル使用メモリ 113,984 KB
実行使用メモリ 30,144 KB
最終ジャッジ日時 2024-05-01 00:36:23
合計ジャッジ時間 5,131 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 42 ms
25,992 KB
testcase_04 AC 42 ms
25,876 KB
testcase_05 AC 38 ms
25,624 KB
testcase_06 AC 45 ms
26,160 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 32 ms
25,516 KB
testcase_13 AC 35 ms
27,492 KB
testcase_14 AC 34 ms
27,140 KB
testcase_15 AC 31 ms
25,108 KB
testcase_16 AC 32 ms
27,344 KB
testcase_17 AC 64 ms
27,908 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 AC 33 ms
25,448 KB
testcase_59 AC 32 ms
25,580 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.Linq;
using System.Collections.Generic;

namespace Algorithm
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = int.Parse(Console.ReadLine());
            var S = Console.ReadLine();
            var A = Console.ReadLine().Split().Select(int.Parse).OrderBy(z => z).ToArray();
            var Q = int.Parse(Console.ReadLine());
            var K = Console.ReadLine().Split().Select(int.Parse).ToArray();

            var acum = new long[N];
            acum[0] = A[0];
            for (var i = 1; i < N; i++)
                acum[i] += acum[i - 1] + A[i];

            for (var i = 0; i < Q; i++)
            {
                var count = 0;
                for (var j = 0; j < N; j++)
                {
                    if (acum[j] <= K[i])
                    {
                        if (S[j] == 'E') count++;
                    }
                    else
                        break;
                }

                Console.WriteLine(count);
            }
        }
    }
}
0