結果
| 問題 | No.149 碁石の移動 |
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2016-11-07 09:54:57 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| コード長 | 715 bytes |
| 記録 | |
| コンパイル時間 | 515 ms |
| コンパイル使用メモリ | 109,732 KB |
| 実行使用メモリ | 18,816 KB |
| 最終ジャッジ日時 | 2026-05-29 23:06:02 |
| 合計ジャッジ時間 | 1,690 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| 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;
class Magatro
{
static void Main()
{
int Aw, Ab;
int Bw, Bb;
int C, D;
string[] s = Console.ReadLine().Split(' ');
Aw = int.Parse(s[0]);
Ab = int.Parse(s[1]);
s = Console.ReadLine().Split(' ');
Bw = int.Parse(s[0]);
Bb = int.Parse(s[1]);
s = Console.ReadLine().Split(' ');
C = int.Parse(s[0]);
D = int.Parse(s[1]);
if (Ab >= C)
{
Ab -= C;
}
else
{
Aw -= C - Ab;
Bw += C - Ab;
}
Aw += Math.Min(D, Bw);
Console.WriteLine(Aw);
}
}
mban