結果

問題 No.759 悪くない忘年会にしような!
ユーザー chocoruskchocorusk
提出日時 2018-12-07 00:37:16
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 1,120 bytes
コンパイル時間 2,710 ms
コンパイル使用メモリ 89,204 KB
実行使用メモリ 255,668 KB
最終ジャッジ日時 2023-10-12 03:08:43
合計ジャッジ時間 52,810 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 179 ms
248,608 KB
testcase_01 AC 203 ms
248,784 KB
testcase_02 AC 175 ms
248,660 KB
testcase_03 AC 174 ms
248,592 KB
testcase_04 AC 175 ms
248,532 KB
testcase_05 AC 174 ms
248,496 KB
testcase_06 AC 174 ms
248,532 KB
testcase_07 AC 164 ms
248,516 KB
testcase_08 AC 163 ms
248,828 KB
testcase_09 AC 164 ms
249,272 KB
testcase_10 AC 161 ms
248,956 KB
testcase_11 AC 161 ms
249,272 KB
testcase_12 AC 161 ms
249,268 KB
testcase_13 AC 161 ms
248,676 KB
testcase_14 AC 160 ms
249,168 KB
testcase_15 AC 162 ms
248,656 KB
testcase_16 AC 160 ms
248,704 KB
testcase_17 AC 163 ms
249,208 KB
testcase_18 AC 160 ms
248,724 KB
testcase_19 AC 162 ms
248,532 KB
testcase_20 AC 161 ms
248,936 KB
testcase_21 AC 160 ms
248,536 KB
testcase_22 AC 163 ms
249,240 KB
testcase_23 AC 161 ms
248,892 KB
testcase_24 AC 160 ms
249,240 KB
testcase_25 AC 162 ms
248,476 KB
testcase_26 AC 161 ms
249,268 KB
testcase_27 AC 173 ms
248,632 KB
testcase_28 AC 175 ms
248,848 KB
testcase_29 AC 161 ms
248,992 KB
testcase_30 AC 159 ms
248,676 KB
testcase_31 AC 160 ms
248,456 KB
testcase_32 AC 161 ms
249,268 KB
testcase_33 AC 325 ms
249,244 KB
testcase_34 AC 190 ms
248,696 KB
testcase_35 AC 247 ms
249,512 KB
testcase_36 AC 323 ms
249,780 KB
testcase_37 AC 198 ms
248,668 KB
testcase_38 AC 350 ms
249,464 KB
testcase_39 AC 198 ms
249,400 KB
testcase_40 AC 295 ms
249,740 KB
testcase_41 AC 313 ms
249,344 KB
testcase_42 AC 347 ms
249,648 KB
testcase_43 AC 362 ms
249,108 KB
testcase_44 TLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 TLE -
testcase_48 TLE -
testcase_49 AC 363 ms
249,796 KB
testcase_50 AC 362 ms
249,972 KB
testcase_51 AC 369 ms
249,924 KB
testcase_52 AC 366 ms
249,196 KB
testcase_53 TLE -
testcase_54 TLE -
testcase_55 TLE -
testcase_56 TLE -
testcase_57 TLE -
testcase_58 TLE -
testcase_59 TLE -
testcase_60 TLE -
testcase_61 TLE -
testcase_62 TLE -
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((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