結果
| 問題 | No.208 王将 |
| コンテスト | |
| ユーザー |
uafr_cs
|
| 提出日時 | 2015-05-15 22:41:37 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 1,000 ms |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 3,074 ms |
| コンパイル使用メモリ | 82,136 KB |
| 実行使用メモリ | 41,728 KB |
| 最終ジャッジ日時 | 2026-04-25 20:12:57 |
| 合計ジャッジ時間 | 4,490 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
final long x = sc.nextLong();
final long y = sc.nextLong();
final long x2 = sc.nextLong();
final long y2 = sc.nextLong();
final long opt = x + y - Math.min(x, y);
if(x == y && x2 == y2 && x2 < x && y2 < y){
System.out.println(opt + 1);
}else{
System.out.println(opt);
}
}
}
uafr_cs