結果
| 問題 | No.2644 Iro Iro-Iro |
| コンテスト | |
| ユーザー |
noya2
|
| 提出日時 | 2024-02-19 21:01:16 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 760 bytes |
| 記録 | |
| コンパイル時間 | 4,538 ms |
| コンパイル使用メモリ | 317,988 KB |
| 実行使用メモリ | 374,216 KB |
| 最終ジャッジ日時 | 2024-09-29 01:15:22 |
| 合計ジャッジ時間 | 93,841 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 3 |
| other | TLE * 30 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using mint = atcoder::static_modint<1107296257>;
// using mint = atcoder::modint998244353;
const int mx = 210;
const int tot = mx*mx*mx;
int colid(int a, int b, int c){
return a + b*mx + c*mx*mx;
}
int main(){
int n, m; cin >> n >> m;
vector<mint> f(tot,0);
for (int i = 0; i < n; i++){
int a, b, c; cin >> a >> b >> c;
f[colid(a,b,c)] = 1;
}
auto g = f;
reverse(g.begin(),g.end());
auto fg = atcoder::convolution(f,g);
int ans = 0;
for (int i = 0; i < m; i++){
int x, y, z; cin >> x >> y >> z;
int d = colid(x,y,z);
int sum = fg[tot-1-d].val();
ans = max(ans,n+n-sum);
}
cout << ans << endl;
}
noya2