제출 #1125912

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
11259122024-12-11 09:45:43zNatsumi메기 농장 (IOI22_fish)C++20
100 / 100
161 ms51284 KiB
#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
const int32_t N = 1e5 + 5,
M = 3e5 + 5;
const int64_t INF = 1e18;
int n, m;
struct info{
int x, y, w;
info(){}
info(int x, int y, int w): x(x), y(y), w(w) {}
} fish[M];
namespace AC{
vector<ii> fish_in_col[N];
vector<long long> pref[2][N], dp[2][N];
long long _max[N];
void init(){
for(int i = 1; i <= m; i++) fish_in_col[fish[i].x].emplace_back(fish[i].y, fish[i].w);
for(int i = 1; i <= n; i++){
fish_in_col[i].emplace_back(0, 0);
sort(fish_in_col[i].begin(), fish_in_col[i].end());
for(auto x : {0, 1}) dp[x][i].resize(fish_in_col[i].size() + 1, 0);
//
_max[i] = -INF;
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...