結果

問題 No.1121 Social Distancing in Cinema
ユーザー catuppercatupper
提出日時 2020-07-22 22:16:23
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,292 bytes
コンパイル時間 1,301 ms
コンパイル使用メモリ 96,884 KB
実行使用メモリ 11,140 KB
最終ジャッジ日時 2023-09-04 21:14:20
合計ジャッジ時間 7,378 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,384 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 5 ms
4,376 KB
testcase_16 AC 14 ms
4,376 KB
testcase_17 AC 52 ms
6,296 KB
testcase_18 AC 97 ms
9,476 KB
testcase_19 AC 114 ms
9,544 KB
testcase_20 AC 5 ms
4,380 KB
testcase_21 AC 4 ms
4,380 KB
testcase_22 AC 4 ms
4,380 KB
testcase_23 AC 3 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 32 ms
4,780 KB
testcase_26 AC 42 ms
7,264 KB
testcase_27 AC 4 ms
4,380 KB
testcase_28 AC 99 ms
10,160 KB
testcase_29 AC 40 ms
6,200 KB
testcase_30 AC 30 ms
5,068 KB
testcase_31 AC 116 ms
9,908 KB
testcase_32 AC 89 ms
9,504 KB
testcase_33 AC 39 ms
6,104 KB
testcase_34 AC 39 ms
7,476 KB
testcase_35 AC 92 ms
10,088 KB
testcase_36 AC 111 ms
9,988 KB
testcase_37 AC 28 ms
4,732 KB
testcase_38 AC 44 ms
6,064 KB
testcase_39 AC 98 ms
9,764 KB
testcase_40 AC 22 ms
4,628 KB
testcase_41 AC 7 ms
4,380 KB
testcase_42 AC 111 ms
9,440 KB
testcase_43 AC 109 ms
10,428 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 1 ms
4,376 KB
testcase_48 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
    sort(ans.begin(), ans.end());
    for(auto ind:ans)cout << ind << " ";cout << endl;
    return 0;
}
0