結果

問題 No.1121 Social Distancing in Cinema
ユーザー e869120e869120
提出日時 2020-07-03 15:30:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 870 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 73,676 KB
実行使用メモリ 9,144 KB
最終ジャッジ日時 2023-10-14 23:35:04
合計ジャッジ時間 5,610 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
9,144 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,352 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,352 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 2 ms
4,352 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 4 ms
4,348 KB
testcase_15 AC 27 ms
4,348 KB
testcase_16 AC 342 ms
4,348 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
using namespace std;

int N, X[250009], Y[250009];
vector<int> idx[90];

int main() {
	cin >> N; assert(1 <= N && N <= 250000);
	for (int i = 1; i <= N; i++) {
		cin >> X[i] >> Y[i]; assert(1 <= X[i] && X[i] <= 500 && 1 <= Y[i] && Y[i] <= 500);
		int t1 = X[i] % 9, t2 = Y[i] % 10;
		if (X[i] % 18 >= 9) t2 = (t2 + 5) % 10;
		idx[t1 * 10 + t2].push_back(i);
	}
	for (int i = 1; i <= N; i++) {
	    for (int j = i + 1; j <= N; j++) assert(make_pair(X[i], Y[i]) != make_pair(X[j], Y[j]));
	}

	pair<int, int> maxn = make_pair(-1, -1);
	for (int i = 0; i < 90; i++) maxn = max(maxn, make_pair((int)idx[i].size(), i));

	cout << idx[maxn.second].size() << endl;
	for (int i = 0; i < idx[maxn.second].size(); i++) {
		if (i) cout << " "; cout << idx[maxn.second][i];
	}
	cout << endl;
	return 0;
}
0