Submission #202134

# Submission time Handle Problem Language Result Execution time Memory
202134 2020-02-14T01:43:46 Z Segtree Amusement Park (JOI17_amusement_park) C++14
0 / 100
18 ms 1412 KB
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<unordered_set>
#include<unordered_map>
#include"Joi.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)
#define all(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
#define mad(a,b) a=(a+b)%mod
void Joi(int N,int M,int A[],int B[],ll X,int T){
    for(int i=0;i<N;i++){
	MessageBoard(X&1,i);
	X>>=1;
    }
}
//----------------

/*int main(){
    
}*/


#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<unordered_set>
#include<unordered_map>
#include"Ioi.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)
#define all(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
#define mad(a,b) a=(a+b)%mod

vector<ll> g[10010];
ll vis[10010];
void dfs(ll x,bool fi){
    if(vis[x]>=0)return;
    if(fi)vis[x]=0;
    else vis[x]=Move(x);
    for(auto y:g[x]){
	dfs(y,0);
	Move(x);
    }
}

ll Ioi(int N,int M,int A[],int B[],int P,int V,int T){
    rep(i,M){
	g[A[i]].push_back(B[i]);
	g[B[i]].push_back(A[i]);
    }
    rep(i,N)vis[i]=-1;
    dfs(P,1);
    vis[P]=V;
    ll ans=0;
    for(int i=0;i<60;i++){
	ans+=(1LL<<i)*vis[i];
    }
    return ans;
}
/*int main(){
    
}*/


# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 1100 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 17 ms 1268 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 1012 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 1412 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 17 ms 1408 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -