結果
問題 | No.678 2Dシューティングゲームの必殺ビーム |
ユーザー | YamaKasa |
提出日時 | 2018-10-01 15:13:50 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 895 bytes |
コンパイル時間 | 2,018 ms |
コンパイル使用メモリ | 77,496 KB |
実行使用メモリ | 63,832 KB |
最終ジャッジ日時 | 2024-04-20 14:16:28 |
合計ジャッジ時間 | 5,779 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 142 ms
63,304 KB |
testcase_01 | AC | 145 ms
63,212 KB |
testcase_02 | AC | 137 ms
62,072 KB |
testcase_03 | AC | 144 ms
62,860 KB |
testcase_04 | WA | - |
testcase_05 | AC | 148 ms
63,320 KB |
testcase_06 | AC | 160 ms
63,440 KB |
testcase_07 | AC | 156 ms
63,308 KB |
testcase_08 | AC | 167 ms
62,964 KB |
testcase_09 | AC | 159 ms
63,336 KB |
testcase_10 | AC | 168 ms
63,400 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 188 ms
63,148 KB |
testcase_14 | AC | 180 ms
63,420 KB |
testcase_15 | AC | 216 ms
63,768 KB |
testcase_16 | AC | 160 ms
63,320 KB |
testcase_17 | AC | 202 ms
63,624 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[][]d = new int[1680][1280]; int N = scan.nextInt(); int xLB = scan.nextInt(); int xRB = scan.nextInt(); for(int i = 0; i < N; i++) { int XL = scan.nextInt(); int YU = scan.nextInt(); int XR = scan.nextInt(); int YD = scan.nextInt(); int id = i + 1; int wMin = Math.max(0, XL); int hMin = Math.max(0, YU); int wMax = Math.min(1279, XR); int hMax = Math.min(1679, YD); for(int h = hMin; h <= hMax; h++) { for(int w = wMin; w <= wMax; w++) { d[h][w] = id; } } } scan.close(); int[]ans = new int[N]; for(int i = xLB; i < xRB; i++) { for(int j = 1679; j >= 0; j--) { if(d[j][i] != 0) { ans[d[j][i] - 1] = 1; break; } } } for(int i : ans) { System.out.println(i); } } }