結果
| 問題 |
No.678 2Dシューティングゲームの必殺ビーム
|
| コンテスト | |
| ユーザー |
uafr_cs
|
| 提出日時 | 2018-04-27 22:39:39 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,056 bytes |
| コンパイル時間 | 2,979 ms |
| コンパイル使用メモリ | 77,780 KB |
| 実行使用メモリ | 54,652 KB |
| 最終ジャッジ日時 | 2024-06-27 21:59:36 |
| 合計ジャッジ時間 | 6,222 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 6 RE * 7 |
ソースコード
import java.math.BigInteger;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int N = sc.nextInt();
final int xLB = sc.nextInt();
final int xRB = sc.nextInt();
final int SIZE = 1280;
int[] low_id = new int[SIZE + 1 + SIZE];
int[] low_height = new int[SIZE + 1 + SIZE];
Arrays.fill(low_id, -1);
Arrays.fill(low_height, -1);
for(int i = 0; i < N; i++) {
final int xl = sc.nextInt() + SIZE;
final int yu = sc.nextInt();
final int xr = sc.nextInt() + SIZE;
final int yl = sc.nextInt();
for(int x = xl; x <= xr; x++) {
if(low_height[x] < yl) {
low_height[x] = yl;
low_id[x] = i;
}
}
}
boolean[] hitted = new boolean[N];
for(int x = 0; x < low_height.length; x++) {
if(low_id[x] >= 0) { hitted[low_id[x]] = true; }
}
for(int i = 0; i < N; i++) {
System.out.println(hitted[i] ? 1 : 0);
}
}
}
uafr_cs