# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
95147 | szawinis | Bitaro’s Party (JOI18_bitaro) | C++17 | 1104 ms | 260168 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author
*/
#include <bits/stdc++.h>
using namespace std;
#define long long long
const long MOD = 1e9+7, LINF = 1e18 + 1e16;
const int INF = 1e9+1;
const double EPS = 1e-10;
const int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
const int MAGIC = 320, N = 1e5+1;
class Bitaro {
int n, m, q, indeg[N];
vector<int> adj[N];
pair<int,int> dp[N][MAGIC], dp2[N];
bool blocked[N];
void naive() {
fill(dp2, dp2+n+1, make_pair(-INF, -1));
for(int u = 1; u <= n; u++) {
if(!blocked[u]) dp2[u] = {0, u};
for(int v: adj[u]) if(dp2[v].first + 1 > dp2[u].first) {
dp2[u] = {dp2[v].first + 1, dp2[v].second};
}
}
}
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... |