結果

問題 No.1121 Social Distancing in Cinema
ユーザー divinediscon10tdivinediscon10t
提出日時 2020-07-23 00:07:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 1,031 bytes
コンパイル時間 3,243 ms
コンパイル使用メモリ 168,324 KB
実行使用メモリ 9,816 KB
最終ジャッジ日時 2023-09-05 06:08:33
合計ジャッジ時間 6,796 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 3 ms
4,380 KB
testcase_16 AC 6 ms
4,376 KB
testcase_17 AC 20 ms
6,492 KB
testcase_18 AC 35 ms
9,024 KB
testcase_19 AC 41 ms
9,528 KB
testcase_20 AC 3 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 12 ms
4,908 KB
testcase_26 AC 16 ms
5,308 KB
testcase_27 AC 3 ms
4,380 KB
testcase_28 AC 37 ms
9,152 KB
testcase_29 AC 14 ms
5,268 KB
testcase_30 AC 11 ms
4,832 KB
testcase_31 AC 41 ms
9,524 KB
testcase_32 AC 32 ms
8,664 KB
testcase_33 AC 15 ms
5,240 KB
testcase_34 AC 14 ms
5,272 KB
testcase_35 AC 34 ms
8,616 KB
testcase_36 AC 40 ms
9,668 KB
testcase_37 AC 12 ms
4,884 KB
testcase_38 AC 17 ms
5,920 KB
testcase_39 AC 36 ms
9,192 KB
testcase_40 AC 9 ms
4,500 KB
testcase_41 AC 4 ms
4,380 KB
testcase_42 AC 40 ms
9,736 KB
testcase_43 AC 40 ms
9,608 KB
testcase_44 AC 40 ms
9,816 KB
testcase_45 AC 40 ms
9,704 KB
testcase_46 AC 38 ms
9,668 KB
testcase_47 AC 1 ms
4,384 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<ll> v[10][10][2];
    zep(i, 0, n){
    	ll p = (x[i] / 9 + y[i] / 5) % 2;
    	v[x[i] % 9][y[i] % 5][p].push_back(i + 1);
    	
    }
    
    ll mx = 0, mi = -1, mj = -1, mk = -1;
    zep(i, 0, 9){
    	zep(j, 0, 5){
    		zep(k, 0, 2){
				if(v[i][j][k].size() > mx){
					mx = v[i][j][k].size();
					mi = i;
					mj = j;
					mk = k;
				}
    		}
    	}
    }
    
    print(mx)
    zep(i, 0, mx)cout << v[mi][mj][mk][i] << " "; cout << endl;
    
    return 0;
}
0