結果
問題 | No.208 王将 |
ユーザー |
![]() |
提出日時 | 2016-01-03 15:57:38 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 1,000 ms |
コード長 | 603 bytes |
コンパイル時間 | 2,079 ms |
コンパイル使用メモリ | 73,900 KB |
実行使用メモリ | 37,052 KB |
最終ジャッジ日時 | 2024-10-09 16:29:11 |
合計ジャッジ時間 | 4,170 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import java.io.*;import java.util.*;class Main {public static void out (Object o) {System.out.println(o);}public static void main (String[] args) throws IOException {BufferedReader br =new BufferedReader(new InputStreamReader(System.in));String[] line1 = br.readLine().split(" ");String[] line2 = br.readLine().split(" ");int x = Integer.parseInt(line1[0]);int y = Integer.parseInt(line1[1]);int x2 = Integer.parseInt(line2[0]);int y2 = Integer.parseInt(line2[1]);int ans = Math.max(x , y);out(x == y && x2 == y2 && x2 < x ? ans + 1 : ans);}}