結果

問題 No.759 悪くない忘年会にしような!
ユーザー chocoruskchocorusk
提出日時 2018-12-07 01:03:04
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,167 bytes
コンパイル時間 1,483 ms
コンパイル使用メモリ 88,136 KB
実行使用メモリ 252,112 KB
最終ジャッジ日時 2023-10-12 03:17:48
合計ジャッジ時間 30,433 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
248,576 KB
testcase_01 AC 107 ms
248,896 KB
testcase_02 AC 107 ms
248,728 KB
testcase_03 AC 106 ms
248,972 KB
testcase_04 AC 104 ms
248,908 KB
testcase_05 AC 103 ms
248,728 KB
testcase_06 AC 107 ms
248,940 KB
testcase_07 WA -
testcase_08 AC 107 ms
248,964 KB
testcase_09 AC 106 ms
248,776 KB
testcase_10 AC 107 ms
248,768 KB
testcase_11 AC 107 ms
248,676 KB
testcase_12 AC 108 ms
248,892 KB
testcase_13 AC 108 ms
248,672 KB
testcase_14 AC 109 ms
249,240 KB
testcase_15 AC 107 ms
248,972 KB
testcase_16 AC 107 ms
249,548 KB
testcase_17 AC 107 ms
248,888 KB
testcase_18 AC 107 ms
248,692 KB
testcase_19 AC 106 ms
248,776 KB
testcase_20 AC 107 ms
249,264 KB
testcase_21 AC 106 ms
248,968 KB
testcase_22 AC 108 ms
249,236 KB
testcase_23 AC 107 ms
248,776 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 105 ms
248,896 KB
testcase_27 AC 105 ms
248,680 KB
testcase_28 AC 108 ms
249,444 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 107 ms
248,676 KB
testcase_32 AC 109 ms
248,836 KB
testcase_33 AC 188 ms
249,820 KB
testcase_34 AC 120 ms
248,908 KB
testcase_35 AC 157 ms
249,736 KB
testcase_36 WA -
testcase_37 AC 123 ms
249,496 KB
testcase_38 WA -
testcase_39 AC 122 ms
248,940 KB
testcase_40 WA -
testcase_41 AC 181 ms
249,168 KB
testcase_42 AC 200 ms
249,368 KB
testcase_43 AC 206 ms
249,400 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 AC 208 ms
249,724 KB
testcase_51 WA -
testcase_52 AC 209 ms
249,688 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 1,079 ms
251,696 KB
testcase_64 WA -
testcase_65 AC 1,086 ms
251,820 KB
testcase_66 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	int n;
	cin>>n;
	vector<int> v[10001], vt[10001], vr[10001];
	int t[100000], r[100000];
	for(int i=0; i<n; i++){
		int p; scanf("%d %d %d", &p, &t[i], &r[i]);
		vt[t[i]].push_back(i);
		vr[r[i]].push_back(i);
		v[p].push_back(i);
	}
	bitset<100000> bt[10002], br[10002], bp;
	for(int i=10000; i>=0; i--){
		bt[i]=bt[i+1], br[i]=br[i+1];
		for(auto j:vt[i]){
			bt[i][j]=1;
		}
		for(auto j:vr[i]){
			br[i][j]=1;
		}
	}
	bool nuee[100001]={};
	for(int i=10000; i>=0; i--){
		for(auto j:v[i]){
			if((bp&bt[t[j]]&br[r[j]]).count()) nuee[j]=1;
		}
		for(auto j:v[i]) bp[j]=1;
		/*for(auto j:v[i]){
		    if(nuee[j]) continue;
			if((bp&bt[t[j]+1]&br[r[j]]).count()) nuee[j]=1;
			else if((bp&bt[t[j]]&br[r[j]+1]).count()) nuee[j]=1;
		}*/
	}
	for(int i=0; i<n; i++){
		if(!nuee[i]) printf("%d\n", i+1);
	}
	return 0;
}
0