結果
問題 |
No.1121 Social Distancing in Cinema
|
ユーザー |
|
提出日時 | 2020-07-22 21:39:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,262 bytes |
コンパイル時間 | 1,113 ms |
コンパイル使用メモリ | 101,348 KB |
実行使用メモリ | 10,932 KB |
最終ジャッジ日時 | 2024-06-22 14:40:41 |
合計ジャッジ時間 | 5,663 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 44 WA * 3 |
ソースコード
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> #include<map> #include<set> #include<string> #include<queue> #include<stack> #include<complex> using namespace std; #define MOD 1000000007 #define MOD2 998244353 #define INF (1<<29) #define LINF (1LL<<60) #define EPS (1e-10) #define PI 3.1415926535897932384626433832795028 typedef long long Int; typedef pair<Int, Int> P; typedef long double Real; typedef complex<Real> CP; typedef pair<P, Int> T; Int n, x, y; vector<T> points; bool no[550][550]; vector<int> ans; int main(){ cin >> n; for(int i = 1;i <= n;i++){ cin >> x >> y; points.push_back({{x,y}, i}); } sort(points.begin(), points.end()); for(auto p:points){ x = p.first.first; y = p.first.second; int ind = p.second; if(no[x][y])continue; ans.push_back(ind); for(int i = -10;i <= 10;i++){ for(int j = -10;j <= 10;j++){ if(0 <= x+i && x+i < 550 && 0<= y + j && y + j < 550) if(i*i+j*j< 10*10) no[x+i][y+j] = true; } } } cout << ans.size() << endl; for(auto ind:ans)cout << ind << " ";cout << endl; return 0; }