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(); } }