結果
| 問題 | 
                            No.1121 Social Distancing in Cinema
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-07-22 21:37:30 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 740 bytes | 
| コンパイル時間 | 807 ms | 
| コンパイル使用メモリ | 79,768 KB | 
| 実行使用メモリ | 13,764 KB | 
| 最終ジャッジ日時 | 2024-06-22 14:28:43 | 
| 合計ジャッジ時間 | 12,990 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | -- * 2 | 
| other | AC * 44 TLE * 1 -- * 2 | 
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main()
      | ^~~~
            
            ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int N;
int X[3<<17],Y[3<<17];
main()
{
	cin>>N;
	vector<pair<pair<int,int>,int> >A(N);
	for(int i=0;i<N;i++)
	{
		cin>>X[i]>>Y[i];
		A[i].first.first=X[i];
		A[i].first.second=Y[i];
		A[i].second=i;
	}
	sort(A.begin(),A.end());
	vector<int>ans;
	int id=0;
	while(ans.size()*90<N)
	{
		while(id<N)
		{
			bool ok=true;
			for(int jd:ans)
			{
				int dx=A[id].first.first-X[jd],dy=A[id].first.second-Y[jd];
				if(dx*dx+dy*dy<100)
				{
					ok=false;
					break;
				}
			}
			if(ok)
			{
				ans.push_back(A[id].second);
				break;
			}
			id++;
		}
		id++;
	}
	cout<<ans.size()<<endl;
	for(int i=0;i<ans.size();i++)cout<<ans[i]+1<<(i+1==ans.size()?"\n":" ");
}