結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
fal_rnd
|
| 提出日時 | 2018-04-25 10:02:34 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 126 ms / 2,000 ms |
| コード長 | 402 bytes |
| コンパイル時間 | 2,049 ms |
| コンパイル使用メモリ | 74,588 KB |
| 実行使用メモリ | 41,448 KB |
| 最終ジャッジ日時 | 2024-06-27 20:59:53 |
| 合計ジャッジ時間 | 5,042 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
import java.util.*;
import java.util.stream.*;
class Main {
static Scanner s=new Scanner(System.in);
static int gInt(){return Integer.parseInt(s.next());}
public static void main(String[]$){
int aw=gInt(),ab=gInt(),bw=gInt(),bb=gInt(),c=gInt(),d=gInt();
aw-=Math.max(0,c-ab);
bw+=Math.max(0,c-ab);
aw+=Math.min(d,bw);
System.out.println(aw);
}
}
fal_rnd