# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1158160 | akzytr | Bitaro’s Party (JOI18_bitaro) | C++20 | 4 ms | 7180 KiB |
#include <bits/stdc++.h>
#define ve vector
#define ar array
#define pb push_back
#define ins insert
#define endl '\n'
#define ll long long
using namespace std;
const int MXN = 1e5+1;
ve<int> adj[MXN];
int blck[MXN];
int from[MXN];
ll dp[MXN];
ve<pair<int, int>> madst[MXN+1];
const int BLCK = 100;
ll ansgy(ll x, ll c){
fill(dp, dp+MXN, -1);
dp[x] = 0;
ll ans = -1;
for(int i = x; i >= 1; i--){
for(int j : adj[i]){
dp[j] = max(dp[j], dp[i]+1);
}
if(blck[i] != c){
ans = max(ans, dp[i]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |