結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー phsplsphspls
提出日時 2020-04-17 21:43:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 746 bytes
コンパイル時間 1,653 ms
コンパイル使用メモリ 172,156 KB
実行使用メモリ 14,592 KB
最終ジャッジ日時 2024-04-14 13:24:11
合計ジャッジ時間 2,918 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
14,336 KB
testcase_01 AC 12 ms
14,336 KB
testcase_02 AC 12 ms
14,208 KB
testcase_03 AC 12 ms
14,336 KB
testcase_04 AC 41 ms
14,208 KB
testcase_05 AC 14 ms
14,208 KB
testcase_06 AC 15 ms
14,208 KB
testcase_07 AC 11 ms
14,208 KB
testcase_08 AC 20 ms
14,336 KB
testcase_09 AC 11 ms
14,336 KB
testcase_10 AC 11 ms
14,208 KB
testcase_11 AC 18 ms
14,208 KB
testcase_12 AC 19 ms
14,208 KB
testcase_13 AC 16 ms
14,592 KB
testcase_14 AC 19 ms
14,464 KB
testcase_15 AC 14 ms
14,592 KB
testcase_16 AC 14 ms
14,208 KB
testcase_17 AC 12 ms
14,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define llong long long

int main() {
    int n, xlb, xrb;
    cin >> n >> xlb >> xrb;
    vector<vector<int>> enemies(2181, vector<int>(1281, 0));
    rep(i, n) {
        int xl, xr, y, _y;
        cin >> xl >> y >> xr >> _y;
        for(int j=max(xl, 0); j<=min(1280, xr); j++) enemies[1680-y][j] = i+1;
    }
    set<int> result;
    rep(x, 1281) {
        if(x < xlb || xrb < x) continue;
        rep(y, 2181) {
            if(enemies[y][x] > 0) {
                result.insert(enemies[y][x]);
                break;
            }
        }
    }
    rep(i, n) {
        if(result.count(i+1)) cout << "1\n";
        else cout << "0\n";
    }
}
0