結果

問題 No.504 ゲーム大会(ランキング)
ユーザー huffman56huffman56
提出日時 2022-12-28 10:58:50
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 510 ms / 2,000 ms
コード長 750 bytes
コンパイル時間 2,388 ms
コンパイル使用メモリ 103,272 KB
実行使用メモリ 29,268 KB
最終ジャッジ日時 2023-08-15 00:48:34
合計ジャッジ時間 7,931 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,740 KB
testcase_01 AC 54 ms
20,728 KB
testcase_02 AC 55 ms
18,684 KB
testcase_03 AC 54 ms
20,808 KB
testcase_04 AC 55 ms
20,752 KB
testcase_05 AC 55 ms
20,856 KB
testcase_06 AC 56 ms
20,808 KB
testcase_07 AC 503 ms
25,180 KB
testcase_08 AC 498 ms
25,164 KB
testcase_09 AC 505 ms
27,252 KB
testcase_10 AC 502 ms
25,324 KB
testcase_11 AC 510 ms
25,276 KB
testcase_12 AC 508 ms
29,224 KB
testcase_13 AC 492 ms
29,268 KB
testcase_14 AC 503 ms
25,272 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.Collections.Generic;
using System.Linq;

namespace _0446
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var ak = int.Parse(Console.ReadLine());
            var tmp = 0;
            var ans = 1;
            var num = new long[n];
            num[0] = 1;

            for (var i = 1; i < n; i++)
            {
                var a = int.Parse(Console.ReadLine());

                if (ak < a)
                {
                    ans++;
                }

                num[i] = ans;
            }

            for (var i = 0; i < n; i++)
            {
                Console.WriteLine(num[i]);
            }

        }
    }
}
0