結果
問題 | No.156 キャンディー・ボックス |
ユーザー | No |
提出日時 | 2015-04-22 17:27:07 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,053 bytes |
コンパイル時間 | 3,691 ms |
コンパイル使用メモリ | 101,152 KB |
実行使用メモリ | 23,844 KB |
最終ジャッジ日時 | 2023-09-18 08:15:28 |
合計ジャッジ時間 | 6,654 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 62 ms
23,636 KB |
testcase_01 | WA | - |
testcase_02 | AC | 61 ms
21,644 KB |
testcase_03 | AC | 61 ms
21,716 KB |
testcase_04 | AC | 61 ms
23,640 KB |
testcase_05 | WA | - |
testcase_06 | AC | 62 ms
19,652 KB |
testcase_07 | AC | 62 ms
21,812 KB |
testcase_08 | AC | 62 ms
21,608 KB |
testcase_09 | AC | 62 ms
21,796 KB |
testcase_10 | AC | 62 ms
19,668 KB |
testcase_11 | AC | 60 ms
21,648 KB |
testcase_12 | AC | 62 ms
21,696 KB |
testcase_13 | AC | 62 ms
21,632 KB |
testcase_14 | AC | 62 ms
23,652 KB |
testcase_15 | AC | 61 ms
19,680 KB |
testcase_16 | AC | 62 ms
21,624 KB |
testcase_17 | AC | 62 ms
23,648 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 61 ms
21,640 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 60 ms
21,840 KB |
testcase_25 | AC | 60 ms
21,668 KB |
testcase_26 | AC | 61 ms
21,672 KB |
testcase_27 | AC | 62 ms
23,688 KB |
testcase_28 | WA | - |
testcase_29 | AC | 62 ms
21,652 KB |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | AC | 90 ms
23,704 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ForYukicoder { class Program { static void Main(string[] args) { string[] str = Console.ReadLine().Split(); int N = int.Parse(str[0]); int M = int.Parse(str[1]); int[] C = Console.ReadLine().Split().Select(int.Parse).ToArray<int>(); //------------ Array.Sort<int>(C); int cnt = 0; while (M > 0) { for (int i = cnt; i < N; i++) { C[i]--; if (C[i] == 0) { cnt++; if (cnt > N - 1) { Console.WriteLine(cnt); return; } } M--; } } Console.WriteLine(cnt); } } }