結果

問題 No.1110 好きな歌
ユーザー 抹茶アイス
提出日時 2023-08-31 16:20:17
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 634 bytes
コンパイル時間 2,522 ms
コンパイル使用メモリ 107,520 KB
実行使用メモリ 44,032 KB
最終ジャッジ日時 2025-01-03 04:39:37
合計ジャッジ時間 178,402 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 TLE * 28
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
using System.Numerics;

namespace yukicoder
{
    public class Program
    {
        public static void Main()
        {
            var line = Console.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
            var n = line[0];
            var d = line[1];
            var a = new int[n];
            for(var i = 0; i < n; i++)
            {
                a[i] = int.Parse(Console.ReadLine());
            }
            foreach(var p in a)
            {
                Console.WriteLine(a.Where(x => x <= p - d).Count());
            }
        }
    }
}
0