結果
問題 |
No.678 2Dシューティングゲームの必殺ビーム
|
ユーザー |
![]() |
提出日時 | 2018-04-27 23:19:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 976 bytes |
コンパイル時間 | 1,643 ms |
コンパイル使用メモリ | 175,128 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-27 22:17:45 |
合計ジャッジ時間 | 2,316 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; struct ST { int l,u,r,d; }; bool operator<(const ST& a, const ST& b){ return a.d > b.d; } int main(){ int N, xLB, xRB; cin >> N >> xLB >> xRB; vector<ST> v; rep(i,N){ int l, u, r, d; cin >> l >> u >> r >> d; v.push_back((ST){l,u,r,d}); } sort(ALLOF(v)); vector<int> field(2000, -1); rep(i,v.size()){ int l = v[i].l; int r = v[i].r; REP(x,l,r+1){ if(x<0 || 1280<x) continue; if(field[x] != -1) continue; field[x] = i; } } vector<int> ret(N, 0); REP(x,xLB,xRB+1){ if(field[x] == -1) continue; ret[field[x]] = 1; } rep(i,ret.size()){ cout << ret[i] << endl; } return 0; }