結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー xxxasdfghjkxxxasdfghjk
提出日時 2018-08-12 16:34:28
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 986 bytes
コンパイル時間 669 ms
コンパイル使用メモリ 73,068 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 16:18:59
合計ジャッジ時間 1,206 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 1 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include<queue>
#include<utility>
#include<cstring>
#include<stack>
#include<algorithm>
#include<cmath>
#include<iostream>
#include<map>
#define MAX_N 100001
#define INF_INT 2147483647
#define INF_LL 9223372036854775807
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
bool cmp_P(const P &a,const P &b){
  return a.second < b.second;
}
int main()
{
  bool bl[200];
  fill(bl,bl+200,false);
  int xl,yu,xr,yd,my[1282],shoot[1282];
  
  fill(my,my+1282,-9999);
  fill(shoot,shoot+1282,-1);
  int N,LB,RB;
  cin >> N >> LB >> RB;
  REP(i,N){
    cin >> xl>>yu>>xr>>yd;
    int j=yd;
    for(int d=max(xl,0);d<=min(1280,xr);d++){
      if(my[d] <= j){
        my[d] = j;
        shoot[d] = i+1;
      }
    }
  }
  for(int i=LB;i<=RB;i++){
    if(shoot[i] != -1){
      bl[shoot[i]] = true;
    }
  }
  REP(i,N){
    if(bl[i+1])
      cout << 1 << endl;
    else
      cout << 0 << endl;
  }
  return 0;
}

0