結果

問題 No.2644 Iro Iro-Iro
ユーザー shobonvipshobonvip
提出日時 2024-02-16 04:39:36
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 574 bytes
コンパイル時間 3,077 ms
コンパイル使用メモリ 205,752 KB
実行使用メモリ 13,480 KB
最終ジャッジ日時 2024-02-16 04:39:59
合計ジャッジ時間 22,557 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
13,480 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 3 ms
6,676 KB
testcase_03 AC 436 ms
6,676 KB
testcase_04 AC 776 ms
6,676 KB
testcase_05 AC 471 ms
6,676 KB
testcase_06 AC 40 ms
6,676 KB
testcase_07 AC 731 ms
6,676 KB
testcase_08 AC 213 ms
6,676 KB
testcase_09 AC 45 ms
6,676 KB
testcase_10 AC 91 ms
6,676 KB
testcase_11 AC 33 ms
6,676 KB
testcase_12 AC 69 ms
6,676 KB
testcase_13 AC 1,725 ms
6,676 KB
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
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 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef bitset<1030301> B;

int main(){
	int n, m; cin >> n >> m;
	vector<int> a(n), b(n), c(n);
	vector<int> x(m), y(m), z(m);
	B moto;
	for (int i=0; i<n; i++){
		cin >> a[i] >> b[i] >> c[i];
		moto[a[i] + b[i] * 101 + c[i] * 101 * 101] = 1;
	}
	int ans = 0;
	for (int i=0; i<m; i++){
		cin >> x[i] >> y[i] >> z[i];
		int t = x[i] + y[i] * 101 + z[i] * 101 * 101;
		if (t >= 0){
			ans = max(ans, (int)(moto | (moto << t)).count());
		}else{
			ans = max(ans, (int)(moto | (moto >> -t)).count());
		}
	}
	cout << ans << '\n';
}
0