結果

問題 No.504 ゲーム大会(ランキング)
ユーザー 14番14番
提出日時 2017-04-21 22:37:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 1,430 bytes
コンパイル時間 2,044 ms
コンパイル使用メモリ 101,092 KB
実行使用メモリ 30,796 KB
最終ジャッジ日時 2023-09-27 11:22:39
合計ジャッジ時間 4,475 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,588 KB
testcase_01 AC 56 ms
18,800 KB
testcase_02 AC 58 ms
22,812 KB
testcase_03 AC 58 ms
22,692 KB
testcase_04 AC 58 ms
20,628 KB
testcase_05 AC 58 ms
22,676 KB
testcase_06 AC 57 ms
20,724 KB
testcase_07 AC 111 ms
28,684 KB
testcase_08 AC 111 ms
28,756 KB
testcase_09 AC 112 ms
28,736 KB
testcase_10 AC 109 ms
28,408 KB
testcase_11 AC 110 ms
26,784 KB
testcase_12 AC 106 ms
26,756 KB
testcase_13 AC 99 ms
25,244 KB
testcase_14 AC 112 ms
30,796 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.Text;
using System.Linq;

class Program
{
    public void Proc()
    {
        Reader.IsDebug = false;
        int count = int.Parse(Reader.ReadLine());
        StringBuilder ans = new StringBuilder();
        long baseScore = 0;
        int rank = 1;
        for (int i = 0; i < count; i++)
        {
            long tmp = long.Parse(Reader.ReadLine());
            if (i > 0)
            {
                if (baseScore < tmp)
                {
                    rank++;
                }
            }
            else
            {
                baseScore = tmp;
            }
            ans.AppendLine(rank.ToString());

        }
        Console.Write(ans.ToString());

    }






    public class Reader
    {
        public static bool IsDebug = true;
        private static String PlainInput = @"


6
1
1
4
5
1
4


";
        private static System.IO.StringReader Sr = null;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (Sr == null)
                {
                    Sr = new System.IO.StringReader(PlainInput.Trim());
                }
                return Sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
    }
    static void Main()
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0