結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー PulmnPulmn
提出日時 2018-06-20 19:41:53
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 1,136 bytes
コンパイル時間 1,226 ms
コンパイル使用メモリ 145,824 KB
実行使用メモリ 23,808 KB
最終ジャッジ日時 2023-09-13 07:23:06
合計ジャッジ時間 2,374 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,444 KB
testcase_01 AC 11 ms
9,436 KB
testcase_02 AC 10 ms
7,480 KB
testcase_03 AC 10 ms
7,432 KB
testcase_04 AC 27 ms
23,776 KB
testcase_05 AC 15 ms
23,788 KB
testcase_06 AC 15 ms
21,756 KB
testcase_07 AC 13 ms
19,840 KB
testcase_08 AC 15 ms
21,764 KB
testcase_09 AC 15 ms
23,808 KB
testcase_10 AC 14 ms
21,764 KB
testcase_11 AC 15 ms
21,740 KB
testcase_12 AC 15 ms
21,764 KB
testcase_13 AC 15 ms
21,892 KB
testcase_14 AC 15 ms
20,240 KB
testcase_15 AC 16 ms
21,768 KB
testcase_16 AC 13 ms
13,912 KB
testcase_17 AC 13 ms
21,772 KB
権限があれば一括ダウンロードができます

ソースコード

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