結果

問題 No.1908 Assault for Keys
ユーザー mobchanmobchan
提出日時 2023-05-10 01:02:07
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 743 bytes
コンパイル時間 16,539 ms
コンパイル使用メモリ 146,376 KB
実行使用メモリ 167,424 KB
最終ジャッジ日時 2023-08-17 12:34:17
合計ジャッジ時間 19,893 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
28,648 KB
testcase_01 AC 52 ms
28,560 KB
testcase_02 AC 65 ms
31,264 KB
testcase_03 AC 61 ms
31,432 KB
testcase_04 AC 61 ms
31,484 KB
testcase_05 AC 65 ms
31,212 KB
testcase_06 AC 66 ms
31,516 KB
testcase_07 AC 64 ms
31,300 KB
testcase_08 AC 62 ms
33,056 KB
testcase_09 AC 63 ms
31,492 KB
testcase_10 AC 62 ms
31,500 KB
testcase_11 AC 64 ms
31,392 KB
testcase_12 AC 65 ms
31,232 KB
testcase_13 AC 65 ms
31,264 KB
testcase_14 AC 64 ms
31,296 KB
testcase_15 AC 63 ms
33,200 KB
testcase_16 AC 53 ms
30,700 KB
testcase_17 AC 52 ms
28,836 KB
testcase_18 AC 64 ms
31,032 KB
testcase_19 AC 62 ms
167,424 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 140 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var N = input[0];
        var M = input[1];

        var list = new List<string>();
        for (int i = 0; i < N; i++)
        {
            list.Add(Console.ReadLine());
        }

        var S = new int[M];
        for (int i = 0; i < M; i++)
        {
            for (int j = 0; j < N; j++)
            {
                if (list[j][i] == 'x') S[i]++;
            }
        }

		var max = 0;
        foreach (var item in S)
        {
            max = Math.Max(max, item);
        }
        Console.WriteLine(max + 1);
    }
}
0