結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー fal_rndfal_rnd
提出日時 2018-05-30 09:41:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 923 bytes
コンパイル時間 1,921 ms
コンパイル使用メモリ 73,916 KB
実行使用メモリ 90,208 KB
最終ジャッジ日時 2023-09-12 20:35:58
合計ジャッジ時間 6,446 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 175 ms
87,564 KB
testcase_01 AC 179 ms
87,396 KB
testcase_02 WA -
testcase_03 AC 177 ms
87,564 KB
testcase_04 AC 176 ms
87,312 KB
testcase_05 WA -
testcase_06 AC 191 ms
87,664 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 216 ms
87,868 KB
testcase_15 WA -
testcase_16 AC 198 ms
87,760 KB
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    static Scanner s=new Scanner(System.in);
    static int gInt(){
        return Integer.parseInt(s.next());
    }
    public static void main(String[] args) {
        int n=gInt();
        int l=gInt(),r=gInt();
        int[][]f=new int[2682][2501];
        Arrays.fill(f[2681],-1);
        int[]hit=new int[n];
        
        for(int i=1;i<=n;++i){
            int sx=gInt()+500,sy=gInt()+500,tx=gInt()+500,ty=gInt()+500;
            for(int y=sy;y<=ty;++y)
                Arrays.fill(f[y],sx,tx+1,i);
        }
        for(int i=2680;i>=0;--i){
            for(int j=1;j<=2500;++j){
                if(f[i+1][j]==-1){
                    if(f[i][j]==0)
                        f[i][j]=-1;
                    else
                        hit[f[i][j]-1]=1;
                }
            }
        }
        for(int i=0;i<n;++i)
            System.out.println(hit[i]);
    }
}
0