結果
| 問題 | No.678 2Dシューティングゲームの必殺ビーム | 
| コンテスト | |
| ユーザー |  どらら | 
| 提出日時 | 2018-04-27 23:24:31 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 964 bytes | 
| コンパイル時間 | 1,751 ms | 
| コンパイル使用メモリ | 173,584 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-27 22:18:31 | 
| 合計ジャッジ時間 | 2,310 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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(5000, -1);
  rep(i,v.size()){
    int l = v[i].l;
    int r = v[i].r;
    REP(x,l,r+1){
      if(x<0) 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;
}
            
            
            
        