結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
iwkjosec
|
| 提出日時 | 2019-10-21 00:06:24 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 111 ms / 3,000 ms |
| コード長 | 2,174 bytes |
| コンパイル時間 | 2,807 ms |
| コンパイル使用メモリ | 105,600 KB |
| 実行使用メモリ | 22,272 KB |
| 最終ジャッジ日時 | 2024-07-02 17:35:54 |
| 合計ジャッジ時間 | 5,528 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.Collections.Generic;
using System.Linq;
using System.Numerics;
using static System.Console;
using static System.Math;
class Program
{
static void Main()
{
SetOut(new System.IO.StreamWriter(OpenStandardOutput()) { AutoFlush = false });
var N = FastIO.Int();
var X = new int[N];
var Y = new int[N];
for (int i = 0; i < X.Length; i++)
{
X[i] = FastIO.Int();
}
for (int i = 0; i < Y.Length; i++)
{
Y[i] = FastIO.Int();
}
var m = int.MaxValue;
for (int i = 0; i < N; i++)
{
var d = X[i] + Y[i];
if (m > d)
{
m = d;
}
}
WriteLine(m);
WriteLine(0);
for (int i = 0; i < N; i++)
{
WriteLine(Min(X[i], m));
}
WriteLine(m);
Out.Flush();
}
}
public static class FastIO
{
static System.IO.Stream str = System.Console.OpenStandardInput();
const int size = 1024;
static byte[] buffer = new byte[size];
static int ptr;
static int len;
static byte Read()
{
if (ptr == len)
{
len = str.Read(buffer, 0, size);
if (len == 0) return 0;
ptr = 0;
}
return buffer[ptr++];
}
public static int Int()
{
var c = Read();
while (c < 0x21)
{
c = Read();
}
var n = false;
if (c == '-')
{
n = true;
c = Read();
}
var ret = 0;
while (c > 0x20)
{
ret = ret * 10 + c - '0';
c = Read();
}
return n ? -ret : ret;
}
public static long Long()
{
var c = Read();
while (c < 0x21)
{
c = Read();
}
var n = false;
if (c == '-')
{
n = true;
c = Read();
}
var ret = 0L;
while (c > 0x20)
{
ret = ret * 10 + c - '0';
c = Read();
}
return n ? -ret : ret;
}
}
iwkjosec