結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー niinii
提出日時 2018-05-12 09:21:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 1,288 bytes
コンパイル時間 879 ms
コンパイル使用メモリ 87,760 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-10 18:18:41
合計ジャッジ時間 1,742 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int,int>
#define VE vector<int>
#define VP vector<PA>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
//
struct poi{
  int X;int Y;int Z;
  bool operator<(const poi&R)const{
    return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
  }
};
//
//
bool out[2000];
int main(){
	int N;
	int LB,RB;
	cin>>N;
	cin>>LB>>RB;
	VP V[2000];
	FOR(i,0,N){
		int XL,YU,XR,YD;
		cin>>XL>>YU>>XR>>YD;
		if(XL<=0){
			XL=1;
		}
		if(YU<=0){
			YU=1;
		}
		if(XR>1280){
			XR=1280;
		}
		if(YD>1680){
			YD=1680;
		}
		FOR(j,XL,XR+1){
			V[j].PB(MA(YD,i));
		}
	}
	FOR(i,LB,RB+1){
		sort(V[i].rbegin(),V[i].rend());
	}
	FOR(i,LB,RB+1){
		if(V[i].empty()){
			continue;
		}else{
			out[V[i][0].SE]=true;
		}
	}
	FOR(i,0,N){
		if(out[i]){
			cout<<1<<endl;
		}else{
			cout<<0<<endl;
		}
	}
	return 0;
}
0