結果

問題 No.759 悪くない忘年会にしような!
ユーザー chocoruskchocorusk
提出日時 2018-12-07 00:39:05
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 1,148 bytes
コンパイル時間 2,300 ms
コンパイル使用メモリ 90,368 KB
実行使用メモリ 255,860 KB
最終ジャッジ日時 2023-10-12 03:09:54
合計ジャッジ時間 38,188 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 183 ms
248,824 KB
testcase_01 AC 186 ms
248,436 KB
testcase_02 AC 182 ms
249,000 KB
testcase_03 AC 181 ms
248,840 KB
testcase_04 AC 180 ms
249,248 KB
testcase_05 AC 180 ms
249,040 KB
testcase_06 AC 193 ms
248,796 KB
testcase_07 AC 180 ms
248,688 KB
testcase_08 AC 180 ms
248,632 KB
testcase_09 AC 180 ms
248,984 KB
testcase_10 AC 179 ms
248,912 KB
testcase_11 AC 180 ms
249,140 KB
testcase_12 AC 180 ms
248,768 KB
testcase_13 AC 180 ms
248,636 KB
testcase_14 AC 179 ms
249,148 KB
testcase_15 AC 180 ms
249,152 KB
testcase_16 AC 180 ms
248,840 KB
testcase_17 AC 180 ms
248,628 KB
testcase_18 AC 179 ms
249,216 KB
testcase_19 AC 179 ms
248,380 KB
testcase_20 AC 182 ms
248,884 KB
testcase_21 AC 180 ms
248,572 KB
testcase_22 AC 180 ms
248,504 KB
testcase_23 AC 183 ms
248,824 KB
testcase_24 AC 182 ms
248,440 KB
testcase_25 AC 185 ms
248,512 KB
testcase_26 AC 150 ms
248,516 KB
testcase_27 AC 148 ms
248,432 KB
testcase_28 AC 149 ms
249,140 KB
testcase_29 AC 149 ms
249,112 KB
testcase_30 AC 148 ms
248,656 KB
testcase_31 AC 181 ms
249,260 KB
testcase_32 AC 181 ms
248,764 KB
testcase_33 AC 274 ms
249,428 KB
testcase_34 AC 194 ms
248,988 KB
testcase_35 AC 232 ms
248,876 KB
testcase_36 AC 268 ms
249,480 KB
testcase_37 AC 199 ms
249,172 KB
testcase_38 AC 282 ms
249,700 KB
testcase_39 AC 201 ms
249,108 KB
testcase_40 AC 254 ms
249,796 KB
testcase_41 AC 263 ms
249,660 KB
testcase_42 AC 282 ms
249,016 KB
testcase_43 AC 294 ms
249,208 KB
testcase_44 AC 1,283 ms
251,728 KB
testcase_45 AC 1,261 ms
251,724 KB
testcase_46 AC 1,260 ms
251,784 KB
testcase_47 AC 1,272 ms
251,644 KB
testcase_48 AC 1,275 ms
251,632 KB
testcase_49 AC 298 ms
249,144 KB
testcase_50 AC 293 ms
249,408 KB
testcase_51 AC 294 ms
249,260 KB
testcase_52 AC 292 ms
249,692 KB
testcase_53 AC 1,267 ms
251,716 KB
testcase_54 AC 1,267 ms
251,700 KB
testcase_55 AC 1,278 ms
251,736 KB
testcase_56 AC 1,272 ms
251,868 KB
testcase_57 AC 1,263 ms
251,644 KB
testcase_58 AC 1,261 ms
251,596 KB
testcase_59 AC 1,251 ms
251,636 KB
testcase_60 AC 1,264 ms
251,568 KB
testcase_61 AC 1,256 ms
251,736 KB
testcase_62 AC 1,264 ms
251,780 KB
testcase_63 TLE -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
権限があれば一括ダウンロードができます

ソースコード

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; cin>>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()>0) 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()>0) nuee[j]=1;
			else if((bp&bt[t[j]]&br[r[j]+1]).count()>0) nuee[j]=1;
		}
	}
	for(int i=0; i<n; i++){
		if(!nuee[i]) cout<<i+1<<endl;
	}
	return 0;
}
0