結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー かぼちゃかぼちゃ
提出日時 2018-04-28 00:08:42
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,076 bytes
コンパイル時間 2,484 ms
コンパイル使用メモリ 78,112 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-10 07:10:06
合計ジャッジ時間 3,226 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 RE -
testcase_02 AC 1 ms
4,380 KB
testcase_03 RE -
testcase_04 WA -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,384 KB
testcase_17 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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(rb-lb);
    REP(i, 0, n){
        int xl,yl,xr,yr;
        cin >> xl >> yl >> xr >> yr;
        xl-=lb-1;
        xr-=lb-1;
        for(int j = xl < 0 ? 0 : xl;j <= xr;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;
}
0