結果

問題 No.909 たぴの配置
ユーザー iwkjoseciwkjosec
提出日時 2019-10-18 21:37:43
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 973 ms / 3,000 ms
コード長 826 bytes
コンパイル時間 2,373 ms
コンパイル使用メモリ 102,260 KB
実行使用メモリ 59,784 KB
最終ジャッジ日時 2023-09-07 21:35:44
合計ジャッジ時間 15,411 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
21,832 KB
testcase_01 AC 59 ms
21,736 KB
testcase_02 AC 58 ms
19,696 KB
testcase_03 AC 58 ms
21,880 KB
testcase_04 AC 58 ms
19,736 KB
testcase_05 AC 918 ms
56,480 KB
testcase_06 AC 969 ms
59,784 KB
testcase_07 AC 935 ms
54,580 KB
testcase_08 AC 931 ms
56,164 KB
testcase_09 AC 973 ms
57,144 KB
testcase_10 AC 911 ms
54,588 KB
testcase_11 AC 887 ms
54,176 KB
testcase_12 AC 931 ms
57,748 KB
testcase_13 AC 936 ms
58,524 KB
testcase_14 AC 889 ms
54,680 KB
testcase_15 AC 916 ms
52,440 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.Numerics;
using static System.Console;
using static System.Math;

class Program
{
    static void Main()
    {
        var N = int.Parse(ReadLine());
        var X = ReadLine().Split().Select(int.Parse).ToArray();
        var Y = ReadLine().Split().Select(int.Parse).ToArray();
        var m = int.MaxValue;
        var k = new int[N];
        for (int i = 0; i < N; i++)
        {
            var d = X[i] + Y[i];
            if (m > d)
            {
                m = d;
            }
        }
        for (int i = 0; i < N; i++)
        {
            k[i] = Min(X[i], m);
        }
        WriteLine(m);
        WriteLine(0);
        for (int i = 0; i < N; i++)
        {
            WriteLine(k[i]);
        }
        WriteLine(m);
    }
}
0