結果
問題 | No.149 碁石の移動 |
ユーザー |
|
提出日時 | 2017-08-25 09:20:36 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 756 bytes |
コンパイル時間 | 3,507 ms |
コンパイル使用メモリ | 105,856 KB |
実行使用メモリ | 19,072 KB |
最終ジャッジ日時 | 2024-12-24 03:27:10 |
合計ジャッジ時間 | 1,840 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.Linq; using System.Collections.Generic; public class yukicoder { public static void Main() { long[] a = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); long[] b = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); long[] c = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); //初回白持ってく数 long move1 = c[0] - a[1]; if(move1 <= 0) move1 = 0; a[0] -= move1; b[0] += move1; long move2 = 0; if(c[1] > b[0]) { Console.WriteLine(a[0] + b[0]); } else { Console.WriteLine(a[0] + c[1]); } } }