結果
| 問題 |
No.678 2Dシューティングゲームの必殺ビーム
|
| コンテスト | |
| ユーザー |
かぼちゃ
|
| 提出日時 | 2018-04-28 00:23:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,140 bytes |
| コンパイル時間 | 675 ms |
| コンパイル使用メモリ | 77,988 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 23:05:43 |
| 合計ジャッジ時間 | 1,299 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 2 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <map>
#include <set>
#include <queue>
#include <stack>
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define REP(i,a,n) for(int i = (a);i < (n);i++)
#define PI 3.14159265359
#define MOD 1000007
#define chmax(a,b) if(a < b)a = b
using namespace std;
int main(){
int n,lb,rb;
cin >> n >> lb >> rb;
vector<pair<int, int>> a(1280);
REP(i, 0, n){
int xl,yl,xr,yr;
cin >> xl >> yl >> xr >> yr;
xl--;
xl = xl < 0 ? 0 : xl;
xr--;
xr = xr > 1279 ? 1279 : xr;
for(int j = max(xl,lb-1);j <= min(xr,rb-1);j++){
if(a[j].second < yl){
a[j].first = i+1;
a[j].second = yl;
}
}
}
sort(ALL(a));
REP(i, 1, n+1){
int ans = 0;
REP(j, 0, a.size()){
if(a[j].first == i){
ans = 1;
break;
}
else if(a[i].first > n){
break;
}
}
cout << ans << endl;
}
return 0;
}
かぼちゃ