結果
問題 | No.1121 Social Distancing in Cinema |
ユーザー | ok |
提出日時 | 2020-07-23 21:53:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 37 ms / 2,000 ms |
コード長 | 996 bytes |
コンパイル時間 | 893 ms |
コンパイル使用メモリ | 88,700 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 20:32:19 |
合計ジャッジ時間 | 4,283 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 47 |
ソースコード
#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<int>>> c(9, vector<vector<int>>(10)); cin>>N; for(int i = 0; i < N; i++){ int x, y; cin>>x>>y; x %= 18; y %= 10; if(x < 9) { c[x%9][y].emplace_back(i+1); } else { c[x%9][(y+5)%10].push_back(i+1); } } 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]; } cout<<endl; return 0; } } } return 0; }