#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(i,X&1);
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 |
1264 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
3088 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
1260 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
3224 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
3200 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |