結果

問題 No.1121 Social Distancing in Cinema
ユーザー 👑 potato167
提出日時 2023-04-11 19:16:20
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 1,699 ms
コンパイル使用メモリ 197,500 KB
最終ジャッジ日時 2025-02-12 05:08:46
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 47
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
using ll = long long;
#define all(p) p.begin(),p.end()

int main(){
	int N;
	cin>>N;
	vector<vector<int>> p(90);
	rep(i,0,N){
		int x,y;
		cin>>x>>y;
		int A=(x%9)*10+(x*5+y)%10;
		p[A].push_back(i+1);
	}
	for(auto x:p){
		if(N<=90*(int)(x.size())){
			cout<<x.size()<<"\n";
			rep(i,0,(int)x.size()){
				if(i) cout<<" ";
				cout<<x[i];
			}
			cout<<"\n";
			return 0;
		}
	}
	assert(false);
}
0