#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(fi)vis[x]=0;
else vis[x]=Move(x);
for(auto y:g[x])if(vis[y]==-1){
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(){
}*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
1264 KB |
Output is correct |
2 |
Correct |
10 ms |
1144 KB |
Output is correct |
3 |
Correct |
10 ms |
1248 KB |
Output is correct |
4 |
Correct |
10 ms |
1144 KB |
Output is correct |
5 |
Correct |
10 ms |
1260 KB |
Output is correct |
6 |
Correct |
11 ms |
1384 KB |
Output is correct |
7 |
Correct |
10 ms |
992 KB |
Output is correct |
8 |
Correct |
10 ms |
1372 KB |
Output is correct |
9 |
Correct |
10 ms |
1224 KB |
Output is correct |
10 |
Correct |
10 ms |
1252 KB |
Output is correct |
11 |
Correct |
14 ms |
1576 KB |
Output is correct |
12 |
Correct |
10 ms |
1256 KB |
Output is correct |
13 |
Correct |
10 ms |
1256 KB |
Output is correct |
14 |
Correct |
10 ms |
1248 KB |
Output is correct |
15 |
Correct |
10 ms |
1124 KB |
Output is correct |
16 |
Correct |
10 ms |
1256 KB |
Output is correct |
17 |
Correct |
10 ms |
1220 KB |
Output is correct |
18 |
Correct |
10 ms |
1248 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
38 ms |
3352 KB |
Output is correct |
2 |
Correct |
37 ms |
3756 KB |
Output is correct |
3 |
Correct |
41 ms |
3740 KB |
Output is correct |
4 |
Correct |
26 ms |
2484 KB |
Output is correct |
5 |
Correct |
25 ms |
2636 KB |
Output is correct |
6 |
Correct |
25 ms |
2704 KB |
Output is correct |
7 |
Correct |
25 ms |
2732 KB |
Output is correct |
8 |
Correct |
27 ms |
2856 KB |
Output is correct |
9 |
Correct |
27 ms |
2580 KB |
Output is correct |
10 |
Correct |
26 ms |
2608 KB |
Output is correct |
11 |
Correct |
25 ms |
2736 KB |
Output is correct |
12 |
Correct |
24 ms |
2492 KB |
Output is correct |
13 |
Correct |
25 ms |
2508 KB |
Output is correct |
14 |
Correct |
25 ms |
2484 KB |
Output is correct |
15 |
Correct |
26 ms |
2596 KB |
Output is correct |
16 |
Correct |
25 ms |
2608 KB |
Output is correct |
17 |
Correct |
25 ms |
2580 KB |
Output is correct |
18 |
Correct |
25 ms |
2484 KB |
Output is correct |
19 |
Correct |
26 ms |
2612 KB |
Output is correct |
20 |
Correct |
22 ms |
2724 KB |
Output is correct |
21 |
Correct |
24 ms |
2476 KB |
Output is correct |
22 |
Correct |
25 ms |
2476 KB |
Output is correct |
23 |
Correct |
25 ms |
2852 KB |
Output is correct |
24 |
Correct |
26 ms |
2856 KB |
Output is correct |
25 |
Correct |
26 ms |
2612 KB |
Output is correct |
26 |
Correct |
26 ms |
2856 KB |
Output is correct |
27 |
Correct |
26 ms |
2608 KB |
Output is correct |
28 |
Correct |
25 ms |
2736 KB |
Output is correct |
29 |
Correct |
25 ms |
2444 KB |
Output is correct |
30 |
Correct |
25 ms |
2488 KB |
Output is correct |
31 |
Correct |
10 ms |
1252 KB |
Output is correct |
32 |
Correct |
10 ms |
1148 KB |
Output is correct |
33 |
Correct |
10 ms |
1152 KB |
Output is correct |
34 |
Correct |
10 ms |
1144 KB |
Output is correct |
35 |
Correct |
10 ms |
1028 KB |
Output is correct |
36 |
Correct |
10 ms |
1236 KB |
Output is correct |
37 |
Correct |
10 ms |
1144 KB |
Output is correct |
38 |
Correct |
10 ms |
1268 KB |
Output is correct |
39 |
Correct |
10 ms |
1256 KB |
Output is correct |
40 |
Correct |
10 ms |
1112 KB |
Output is correct |
41 |
Correct |
10 ms |
1256 KB |
Output is correct |
42 |
Correct |
10 ms |
1264 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
1256 KB |
Output is correct |
2 |
Correct |
10 ms |
1264 KB |
Output is correct |
3 |
Correct |
10 ms |
1256 KB |
Output is correct |
4 |
Incorrect |
12 ms |
1352 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
37 ms |
3352 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
37 ms |
3348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |