結果

問題 No.1121 Social Distancing in Cinema
ユーザー SSRSSSRS
提出日時 2020-07-22 21:53:43
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 750 bytes
コンパイル時間 2,723 ms
コンパイル使用メモリ 170,532 KB
実行使用メモリ 6,704 KB
最終ジャッジ日時 2023-09-04 18:09:41
合計ジャッジ時間 7,077 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,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 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 2 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 4 ms
4,380 KB
testcase_16 AC 13 ms
4,376 KB
testcase_17 AC 44 ms
4,884 KB
testcase_18 AC 83 ms
6,308 KB
testcase_19 AC 97 ms
6,408 KB
testcase_20 AC 4 ms
4,380 KB
testcase_21 AC 4 ms
4,376 KB
testcase_22 AC 4 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 27 ms
4,384 KB
testcase_26 AC 34 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 86 ms
6,256 KB
testcase_29 AC 33 ms
4,380 KB
testcase_30 AC 25 ms
4,376 KB
testcase_31 AC 97 ms
6,496 KB
testcase_32 AC 75 ms
5,956 KB
testcase_33 AC 32 ms
4,380 KB
testcase_34 AC 33 ms
4,376 KB
testcase_35 AC 79 ms
6,240 KB
testcase_36 AC 94 ms
6,568 KB
testcase_37 AC 24 ms
4,380 KB
testcase_38 AC 37 ms
4,696 KB
testcase_39 AC 85 ms
6,208 KB
testcase_40 AC 19 ms
4,380 KB
testcase_41 AC 6 ms
4,376 KB
testcase_42 AC 93 ms
6,524 KB
testcase_43 AC 93 ms
6,568 KB
testcase_44 AC 93 ms
6,516 KB
testcase_45 AC 93 ms
6,704 KB
testcase_46 AC 92 ms
6,296 KB
testcase_47 AC 2 ms
4,380 KB
testcase_48 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> X(N), Y(N);
  for (int i = 0; i < N; i++){
    cin >> X[i] >> Y[i];
  }
  vector<vector<int>> group(90);
  for (int i = 0; i < N; i++){
    X[i] %= 10;
    Y[i] %= 18;
    int g = 0;
    if (X[i] >= 5){
      g ^= 45;
      X[i] -= 5;
    }
    if (Y[i] >= 9){
      g ^= 45;
      Y[i] -= 9;
    }
    g += X[i] * 9 + Y[i];
    group[g].push_back(i);
  }
  int mx_g = 0;
  for (int i = 1; i < 90; i++){
    if (group[i].size() > group[mx_g].size()){
      mx_g = i;
    }
  }
  int K = group[mx_g].size();
  cout << K << endl;
  for (int i = 0; i < K; i++){
    cout << group[mx_g][i] + 1;
    if (i < K - 1){
      cout << ' ';
    }
  }
  cout << endl;
}
0