結果

問題 No.1121 Social Distancing in Cinema
ユーザー ok
提出日時 2020-07-23 21:45:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,031 bytes
コンパイル時間 1,087 ms
コンパイル使用メモリ 89,460 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-23 20:22:30
合計ジャッジ時間 13,531 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 9 WA * 4 RE * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

#define int long long
#define endl "\n"

constexpr long long INF = (long long)1e18;
constexpr long long MOD = 1'000'000'007; 

struct fast_io {
	fast_io(){
		std::cin.tie(nullptr);
		std::ios::sync_with_stdio(false);
	};
} fio;

signed main(){
	cout<<fixed<<setprecision(10);
	
	int N;
	vector<vector<vector<pair<int,int>>>> c(9, vector<vector<pair<int,int>>>(10));
	
	cin>>N;
	
	for(int i = 0; i < N; i++){
		int x, y;
		
		cin>>x>>y;
		
		if(x%18 < 9) {
			c[x%18][y%10].emplace_back(x,y);
			
		} else {
			c[x-9][(y+5)%10].emplace_back(x,y);
		}
	}
	
	for(int i = 0; i< c.size(); i++){
		for(int j = 0; j < c[i].size(); j++){
			if(c[i][j].size() * 90 >= N) {
				cout<<c[i][j].size()<<endl;
				
				for(int k = 0; k < c[i][j].size(); k++){
					if(k) cout<<" ";
					cout<<c[i][j][k].first<<" "<<c[i][j][k].second;
				}
				cout<<endl;
				return 0;
			}
		}
	}
	
	return 0;
}
0