Submission #1352951
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yahoo_procon2017_qual_b { class Program { static int MinIndexReturn(int[] A) { int j = 0; int Min = 999999999; for(int i = 0; i < A.Length; i++) { if (A[i] < Min) { Min = A[i]; j = i; } } return j; } static void Main(string[] args) { int num = 0; string[] str = Console.ReadLine().Split(); int N = int.Parse(str[0]); int K = int.Parse(str[1]); int[] A = Console.ReadLine().Split().Select(int.Parse).ToArray(); for(int i = 0; i < K; i++) { int j = MinIndexReturn(A); num += A[j] + i; A[j] = 99999999; } Console.WriteLine(num); } } }
Submission Info
Submission Time | |
---|---|
Task | B - オークション |
User | sh10_t |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 1076 Byte |
Status | WA |
Exec Time | 2108 ms |
Memory | 21600 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt |
All | sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | TLE | 2108 ms | 17120 KB |
in10.txt | WA | 1941 ms | 19680 KB |
in11.txt | TLE | 2108 ms | 19168 KB |
in12.txt | AC | 67 ms | 17504 KB |
in13.txt | AC | 23 ms | 11348 KB |
in2.txt | WA | 1042 ms | 17632 KB |
in3.txt | WA | 165 ms | 19680 KB |
in4.txt | AC | 77 ms | 17632 KB |
in5.txt | AC | 69 ms | 21600 KB |
in6.txt | AC | 68 ms | 17504 KB |
in7.txt | TLE | 2108 ms | 21216 KB |
in8.txt | TLE | 2108 ms | 19168 KB |
in9.txt | AC | 69 ms | 17632 KB |
sample1.txt | AC | 23 ms | 11348 KB |
sample2.txt | AC | 23 ms | 11220 KB |