Submission #172182


Source Code Expand

Copy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication3
{
    class B
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int R = int.Parse(s[0]);
            int C = int.Parse(s[1]);
            int D = int.Parse(s[2]);
            int ans = calc(R, C, D);
            Console.WriteLine(ans);
            Console.ReadLine();

        }

        public static int calc(int ylimit, int xlimit, int D)
        {
            //int[,] kakaku = new int[xlimit, ylimit];
            //int[,] saitan = new int[xlimit, ylimit];
            List<int> kakaku = new List<int>();

            for (int y= 0; y < ylimit; y++)
            {
                string[] s = Console.ReadLine().Split(' ');
                int Dmod2 = D % 2;
                for (int x = 0; x < xlimit; x++)
                {
                    if ((Dmod2 != (x+y) %2) ||(x + y > D))
                    {
                        continue;
                    }
                    else
                    {
                        kakaku.Add(int.Parse(s[x]));
                    }
                }
            }
            kakaku.Sort();
            return kakaku[kakaku.Count - 1];
        }
   
    }//B
}

Submission Info

Submission Time
Task B - 謎の人物X
User moheiji
Language C# (Mono 2.10.8.1)
Score 100
Code Size 1359 Byte
Status AC
Exec Time 525 ms
Memory 14676 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 60 / 60 40 / 40
Status
AC × 3
AC × 18
AC × 30
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt
Subtask2 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt
Case Name Status Exec Time Memory
sample_01.txt AC 142 ms 7832 KB
sample_02.txt AC 137 ms 7864 KB
sample_03.txt AC 138 ms 7852 KB
subtask1_01.txt AC 139 ms 7820 KB
subtask1_02.txt AC 139 ms 7856 KB
subtask1_03.txt AC 144 ms 7928 KB
subtask1_04.txt AC 143 ms 8092 KB
subtask1_05.txt AC 143 ms 7832 KB
subtask1_06.txt AC 144 ms 8032 KB
subtask1_07.txt AC 149 ms 7960 KB
subtask1_08.txt AC 142 ms 8096 KB
subtask1_09.txt AC 146 ms 8088 KB
subtask1_10.txt AC 143 ms 7940 KB
subtask1_11.txt AC 143 ms 8036 KB
subtask1_12.txt AC 141 ms 8080 KB
subtask1_13.txt AC 149 ms 8044 KB
subtask1_14.txt AC 145 ms 7968 KB
subtask1_15.txt AC 144 ms 8084 KB
subtask2_01.txt AC 144 ms 8032 KB
subtask2_02.txt AC 142 ms 8036 KB
subtask2_03.txt AC 254 ms 11164 KB
subtask2_04.txt AC 143 ms 7964 KB
subtask2_05.txt AC 159 ms 8160 KB
subtask2_06.txt AC 209 ms 9444 KB
subtask2_07.txt AC 312 ms 11868 KB
subtask2_08.txt AC 429 ms 8272 KB
subtask2_09.txt AC 419 ms 11312 KB
subtask2_10.txt AC 525 ms 14676 KB
subtask2_11.txt AC 364 ms 9424 KB
subtask2_12.txt AC 449 ms 8276 KB
subtask2_13.txt AC 483 ms 14352 KB
subtask2_14.txt AC 521 ms 14364 KB
subtask2_15.txt AC 493 ms 14356 KB