# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1052455 | handlename | Amusement Park (CEOI19_amusementpark) | C++17 | 3062 ms | 3788 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.
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define float long double
// const int MOD=1e9+7;
const int MOD=998244353;
const int sqn=450;
const long double eps=1e-6;
const int dx[4]={0,0,1,-1};
const int dy[4]={1,-1,0,0};
long long power(long long a,long long b,long long p=MOD){
long long res=1;
while (b>0){
if (b%2==1) res=(res*a)%p;
b/=2;
a=(a*a)%p;
}
return res;
}
int n,m;
bool adj[20][20],indep[1000001];
// for each legal proposal, reversing the edges creates another
// costs for this pair is m
// sum of costs is m * DAGCount/2
// where DAGCount = number of DAGs on original graph
long long dp[1000001];
// dp[mask] = number of DAGs on graph with mask vertices
// for any DAG, at least 1 vertex has out degree 0
// we loop through all possible subsets of vertices with out degree 0
# | 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... |