結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 3 ms
4,380 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 4 ms
4,376 KB
testcase_16 AC 10 ms
5,344 KB
testcase_17 AC 36 ms
11,372 KB
testcase_18 AC 66 ms
18,432 KB
testcase_19 AC 79 ms
20,844 KB
testcase_20 AC 4 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,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 23 ms
8,272 KB
testcase_26 AC 29 ms
9,436 KB
testcase_27 AC 4 ms
4,376 KB
testcase_28 AC 68 ms
18,892 KB
testcase_29 AC 28 ms
9,008 KB
testcase_30 AC 20 ms
7,700 KB
testcase_31 AC 78 ms
21,024 KB
testcase_32 AC 59 ms
16,816 KB
testcase_33 AC 26 ms
9,112 KB
testcase_34 AC 26 ms
9,008 KB
testcase_35 AC 63 ms
17,668 KB
testcase_36 AC 75 ms
20,320 KB
testcase_37 AC 19 ms
7,500 KB
testcase_38 AC 29 ms
9,836 KB
testcase_39 AC 67 ms
18,672 KB
testcase_40 AC 15 ms
6,392 KB
testcase_41 AC 6 ms
4,380 KB
testcase_42 AC 75 ms
20,168 KB
testcase_43 AC 75 ms
20,424 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 2 ms
4,380 KB
testcase_48 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i = (m); i <= (n); i++)
#define zep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x,m,n) for(int i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<<endl;

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    
    ll n; cin >> n;
    ll x[n], y[n]; zep(i, 0, n)cin >> x[i] >> y[i];
    
    vector<vector<ll>> v(n);
    zep(i, 0, n)v[i] = {x[i], y[i], i + 1};
    sort(v.begin(), v.end());
    
    bool use[555][555]; memset(use, 0, sizeof(use));
    vector<ll> ans;
    zep(i, 0, n){
    	if(!use[v[i][0]][v[i][1]]){
    		//cout << v[i][0] << " " << v[i][1] << " " << v[i][2] << endl;
    		use[v[i][0]][v[i][1]] = true;
    		ans.push_back(v[i][2]);
    		
    		rep(j, -10, 10){
    			rep(k, -10, 10){
    				if(j * j + k * k < 100){
    					if(1 <= v[i][0] + j && v[i][0] + j <= 500 && 1 <= v[i][1] + k && v[i][1] + k <= 500){
    						use[v[i][0] + j][v[i][1] + k] = true;
    						//cout << j << " " << k << endl;
    					}
    				}
    			}
    		}
    	}
    }
    
    print(ans.size())
    zep(i, 0, ans.size())cout << ans[i] << " "; cout << endl;
    
    return 0;
}
0