結果
| 問題 | No.909 たぴの配置 |
| コンテスト | |
| ユーザー |
tomomo2b2
|
| 提出日時 | 2019-10-18 21:34:06 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 160 ms / 3,000 ms |
| コード長 | 918 bytes |
| 記録 | |
| コンパイル時間 | 633 ms |
| コンパイル使用メモリ | 114,996 KB |
| 実行使用メモリ | 61,568 KB |
| 最終ジャッジ日時 | 2026-03-11 23:37:18 |
| 合計ジャッジ時間 | 3,912 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
class MyClass
{
public static void Solve()
{
var N = int.Parse(Console.ReadLine());
var X = Console.ReadLine().Split().Select(int.Parse).ToArray();
var Y = Console.ReadLine().Split().Select(int.Parse).ToArray();
var min = Enumerable.Range(0, N).Select(i => X[i] + Y[i]).Min();
Console.WriteLine(min);
var pos = new int[N + 2];
pos[0] = 0;
pos[N + 1] = min;
for (int i = 0; i < N; i++)
{
pos[i + 1] = Math.Min(X[i], min);
}
foreach (var item in pos)
{
Console.WriteLine(item);
}
}
public static void Main()
{
var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
Console.SetOut(sw);
Solve();
Console.Out.Flush();
}
}
tomomo2b2