結果
| 問題 |
No.2092 Conjugation
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2022-10-08 06:53:59 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| コード長 | 692 bytes |
| コンパイル時間 | 3,748 ms |
| コンパイル使用メモリ | 113,908 KB |
| 実行使用メモリ | 42,388 KB |
| 最終ジャッジ日時 | 2024-06-22 03:51:22 |
| 合計ジャッジ時間 | 6,415 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using static System.Math;
using System.Collections.Generic;
using System.Linq;
using System;
public class Hello
{
static void Main()
{
var n = int.Parse(Console.ReadLine().Trim());
string[] line = Console.ReadLine().Trim().Split(' ');
var a = Array.ConvertAll(line, long.Parse);
getAns(n, a);
}
static void getAns(int n, long[] a)
{
var b = new int[100001];
foreach (var x in a) b[x]++;
var ans = new long[a[0]];
var s = b.Sum();
ans[0] = s;
for (int i = 1; i < a[0]; i++)
{
ans[i] = ans[i - 1] - b[i];
}
Console.WriteLine(string.Join(" ", ans));
}
}
bluemegane