結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー Pulmn
提出日時 2018-06-20 19:41:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 1,136 bytes
コンパイル時間 1,296 ms
コンパイル使用メモリ 160,568 KB
実行使用メモリ 23,760 KB
最終ジャッジ日時 2024-06-30 17:26:57
合計ジャッジ時間 2,188 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

const int M=3000,D=500;
int n,l,r,a[M][M];

int main(){
	cin>>n>>l>>r;
	l+=D,r+=D;
	for(int i=0;i<n;i++){
		int x1,y1,x2,y2;
		cin>>x1>>y1>>x2>>y2;
		x1+=D,y1+=D,x2+=D,y2+=D;
		for(int x=x1;x<=x2;x++) for(int y=y1;y<=y2;y++) a[x][y]=i+1;
	}
	while(l<=r){
		for(int i=M-1;i>=0;i--){
			if(a[l][i]) break;
			a[l][i]=-1;
		}
		l++;
	}
	vi b(n);
	for(int i=0;i<M;i++) for(int j=0;j<M;j++) if(a[i][j]>0&&a[i][j+1]<0) b[a[i][j]-1]=1;
	for(auto i:b) cout<<i<<endl;
}
0