# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1125912 | zNatsumi | 메기 농장 (IOI22_fish) | C++20 | 161 ms | 51284 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;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |