結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー donkorin_donkorin_
提出日時 2018-09-19 14:38:20
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,273 bytes
コンパイル時間 1,762 ms
コンパイル使用メモリ 173,068 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 10:08:26
合計ジャッジ時間 2,909 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define erep(i,a,b) for(int i=a;i<=(int)(b);++i)
#define per(i,a,b) for(int i=(a);i>(b);--i)
#define eper(i,a,b) for(int i=(a);i>=b;--i)
#define pb push_back
#define mp make_pair
#define INF (1<<31)-1
#define MOD 1000000007
#define all(x) (x).begin(),(x).end()
#define vii vector<int>
#define vll vector<long long>
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a, b)*b;}

int n, xlb, xrb, lx[205], rx[205], yu[205], yd[205]; 
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
    cin >> n >> xlb >> xrb;
    rep(i, 0, n) cin >> lx[i] >> yu[i] >> rx[i] >> yd[i];
    vii ans(n);
    erep(i, xlb, xrb) {
        vector<Pii> a;
        rep(j, 0, n) {
            if (lx[j] <= i && i <= rx[j]) a.pb(mp(-yd[j], j));
        }
        sort(all(a));
        if (!a.empty()) ans[a[0].second] = 1;
    }
    rep(i, 0, n) {
        cout << ans[i] << endl;
    }
    return 0;
}
0