結果

問題 No.2644 Iro Iro-Iro
ユーザー cho435cho435
提出日時 2024-02-13 01:03:31
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 652 bytes
コンパイル時間 6,551 ms
コンパイル使用メモリ 302,452 KB
実行使用メモリ 13,480 KB
最終ジャッジ日時 2024-02-16 04:46:25
合計ジャッジ時間 14,940 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 130 ms
6,676 KB
testcase_04 AC 211 ms
6,676 KB
testcase_05 AC 129 ms
6,676 KB
testcase_06 AC 13 ms
6,676 KB
testcase_07 AC 195 ms
6,676 KB
testcase_08 AC 62 ms
6,676 KB
testcase_09 AC 14 ms
6,676 KB
testcase_10 AC 26 ms
6,676 KB
testcase_11 AC 11 ms
6,676 KB
testcase_12 AC 21 ms
6,676 KB
testcase_13 AC 488 ms
6,676 KB
testcase_14 AC 677 ms
6,676 KB
testcase_15 AC 592 ms
6,676 KB
testcase_16 AC 660 ms
6,676 KB
testcase_17 AC 823 ms
6,676 KB
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 #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)

int main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n,m;
	cin>>n>>m;
	vector<int> a(n),b(n),c(n);
	vector<int> x(m),y(m),z(m);
	rep(i,n) cin>>a[i]>>b[i]>>c[i];
	rep(i,m) cin>>x[i]>>y[i]>>z[i];
	bitset<1030301> stl;
	rep(i,n){
		stl[a[i]+101*b[i]+101*101*c[i]]=1;
	}
	int ans=n;
	rep(j,m){
		int tmp=0;
		tmp=(stl&(stl>>abs(x[j]+101*y[j]+101*101*z[j]))).count();
		ans=max(ans,n*2-tmp);
	}
	cout<<ans<<"\n";
}
0