結果
| 問題 | No.678 2Dシューティングゲームの必殺ビーム | 
| コンテスト | |
| ユーザー |  aaa | 
| 提出日時 | 2018-07-20 09:58:07 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,541 bytes | 
| コンパイル時間 | 1,200 ms | 
| コンパイル使用メモリ | 101,368 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-26 04:20:29 | 
| 合計ジャッジ時間 | 2,086 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 WA * 4 RE * 1 | 
ソースコード
#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] = { true };
	bool ans[200] = { false };
	fill(matx, matx + 1300, true);
	for (i = 0; i < 200; i++) {
		p[i].first.first = -999999;
	}
	cin >> n >> lb >> rb;
	for (i = lb; i <= rb; i++) {
		matx[i] = false;
	}
	for (i = 0; i < n; i++) {
		int z;
		cin >> p[i].second.first;
		cin >> z;
		cin >> p[i].second.second;
		cin >> p[i].first.first;
		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 (j < 0)continue;
			if (matx[j] == false) {
				matx[j] = true;
				//flag2 = true;
				ans[p[i].first.second] = true;
			}
		}
		/*
		for (i = 0; i < 1200; i++) {
			if (matx[i] == false) {
				cout << "X";
			}
			else {
				cout << "0";
			}
		}
		cout << endl;
		cout << endl;
		cout << endl;
		cout << endl;
		cout << endl;
		cout << endl;
		*/
	}
	for (i = 0; i < n; i++) {
		if (ans[i] == true) {
			cout << 1 << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
	getchar();
	getchar();
	return 0;
}
            
            
            
        