結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー aaaaaa
提出日時 2018-07-20 09:24:05
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,206 bytes
コンパイル時間 2,951 ms
コンパイル使用メモリ 99,252 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-27 00:14:29
合計ジャッジ時間 2,750 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>

using namespace std;


int main() {
	int i, j, k;
	int n, lb, rb;
	//vector< pair<int, pair<int, int>>> p(200);
	vector< pair<pair<int,int>, pair<int, int>>> p(200);
	bool matx[1300] = { false };
	bool ans[200] = { false };

	for (i = 0; i < 200; i++) {
		p[i].first.first = -999999;
	}

	cin >> n >> lb >> rb;

	for (i = 0; i < n; i++) {
		int z;
		cin >> p[i].second.first;
		cin >> p[i].first.first;
		cin >> p[i].second.second;
		cin >> z;
		p[i].first.second = i;
	}

	sort(p.begin(), p.end(),greater<pair< pair<int,int>, pair<int,int>>>());

	for (i = 0; i < n; i++) {
		bool flag2 = false;

		for (j = p[i].second.first; j <= p[i].second.second; j++) {
			if (matx[j] == false) {
				matx[j] = true;
				flag2 = true;
				ans[p[i].first.second] = true;
			}
		}

	}


	for (i = 0; i < n; i++) {
		if (ans[i] == true) {
			cout << 1 << endl;
		}
		else {
			cout << 0 << endl;
		}
	}


	getchar();
	getchar();
	return 0;
}
0