結果

問題 No.231 めぐるはめぐる (1)
ユーザー mbanmban
提出日時 2016-11-05 12:00:03
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 63 ms / 1,000 ms
コード長 861 bytes
コンパイル時間 2,062 ms
コンパイル使用メモリ 100,968 KB
実行使用メモリ 24,892 KB
最終ジャッジ日時 2023-08-16 13:50:10
合計ジャッジ時間 3,831 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
22,844 KB
testcase_01 AC 59 ms
24,828 KB
testcase_02 AC 59 ms
22,532 KB
testcase_03 AC 62 ms
22,680 KB
testcase_04 AC 62 ms
20,932 KB
testcase_05 AC 60 ms
22,800 KB
testcase_06 AC 61 ms
20,724 KB
testcase_07 AC 60 ms
22,836 KB
testcase_08 AC 61 ms
24,700 KB
testcase_09 AC 60 ms
24,892 KB
testcase_10 AC 60 ms
20,776 KB
testcase_11 AC 58 ms
22,756 KB
testcase_12 AC 63 ms
24,692 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;
using System.Text;
using System.Threading.Tasks;

class Magatro
{
    static void Main()
    {
        int keiken = 3000000;
        int N = int.Parse(Console.ReadLine());
        int D = 30000;
        Random r = new Random();
        List<int> l = new List<int>();
        for (int i = 0; i < N; i++)
        {
            string[] GD = Console.ReadLine().Split(' ');
            if ((int.Parse(GD[0]) - int.Parse(GD[1]) * D) * 6 >= keiken)
            {
                l.Add(i + 1);
            }
        }
        if (l.Count == 0)
        {
            Console.WriteLine("NO");
        }
        else
        {
            Console.WriteLine("YES");
            for(int i = 0; i < 6; i++)
            {
                Console.WriteLine(l[r.Next(l.Count)]);
            }
        }
    }
}
0