結果

問題 No.504 ゲーム大会(ランキング)
ユーザー curryudon08curryudon08
提出日時 2020-07-13 18:16:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 632 bytes
コンパイル時間 1,071 ms
コンパイル使用メモリ 106,240 KB
実行使用メモリ 25,344 KB
最終ジャッジ日時 2024-04-25 10:50:39
合計ジャッジ時間 3,542 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
18,816 KB
testcase_01 AC 22 ms
18,688 KB
testcase_02 AC 22 ms
18,816 KB
testcase_03 AC 22 ms
18,816 KB
testcase_04 AC 22 ms
18,816 KB
testcase_05 AC 21 ms
18,688 KB
testcase_06 AC 21 ms
18,688 KB
testcase_07 AC 72 ms
25,088 KB
testcase_08 AC 71 ms
25,216 KB
testcase_09 AC 74 ms
25,216 KB
testcase_10 AC 74 ms
24,832 KB
testcase_11 AC 72 ms
25,344 KB
testcase_12 AC 68 ms
25,088 KB
testcase_13 AC 61 ms
23,808 KB
testcase_14 AC 74 ms
25,216 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;

namespace _0504
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = long.Parse(Console.ReadLine());

            var a = long.Parse(Console.ReadLine());
            var p = 1;
            
            var s = new long[n];
            s[0] = p;

            for(var i = 0; i < n - 1; i++){
                var t = long.Parse(Console.ReadLine());
                if(t > a){
                    p++;
                }
                s[i+1] = p;
            }

            Console.WriteLine(string.Join("\n",s.Select(x => x.ToString())));
        }
    }
}
0