#include "Joi.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e6+7;
const int inf=INT_MAX;
const ll inff=1e18;
const ll mod=1e9+7;
#define pii pair<int,int>
#define mkp make_pair
#define F first
#define S second
#define pb push_back
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()
//#define int ll
#ifdef HNO2
#define IOS
#else
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#endif // HNO2
namespace {
} // namespace
void Joi(int N, int M, int A[], int B[], long long X, int T) {
for (int i=0;i<N;i++)
{
if (i>=60) MessageBoard(i,0);
else if ((1ll<<i)&X) MessageBoard(i,1);
else MessageBoard(i,0);
}
}
#include "Ioi.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e4+7;
const int inf=INT_MAX;
const ll inff=1e18;
const ll mod=1e9+7;
#define pii pair<int,int>
#define mkp make_pair
#define F first
#define S second
#define pb push_back
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()
//#define int ll
#ifdef HNO2
#define IOS
#else
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#endif // HNO2
namespace {
int used[maxn];
int ans[maxn];
vector<int> G[maxn];
void dfs(int now)
{
used[now]=1;
for (int i:G[now])
if (!used[i])
{
ans[i]=Move(i);
dfs(i);
Move(now);
}
}
}
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T)
{
for (int i=0;i<M;i++)
G[A[i]].pb(B[i]),G[B[i]].pb(A[i]);
ans[P]=V;
dfs(P);
ll ret=0;
for (int j=0;j<60;j++) ret|=(1ll<<j)*ans[j];
return ret;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
1248 KB |
Output is correct |
2 |
Correct |
9 ms |
1132 KB |
Output is correct |
3 |
Correct |
10 ms |
1268 KB |
Output is correct |
4 |
Correct |
9 ms |
1272 KB |
Output is correct |
5 |
Correct |
10 ms |
1284 KB |
Output is correct |
6 |
Correct |
10 ms |
1272 KB |
Output is correct |
7 |
Correct |
10 ms |
1272 KB |
Output is correct |
8 |
Correct |
10 ms |
1272 KB |
Output is correct |
9 |
Correct |
10 ms |
1168 KB |
Output is correct |
10 |
Correct |
10 ms |
1268 KB |
Output is correct |
11 |
Correct |
14 ms |
1508 KB |
Output is correct |
12 |
Correct |
10 ms |
1248 KB |
Output is correct |
13 |
Correct |
10 ms |
1268 KB |
Output is correct |
14 |
Correct |
10 ms |
1272 KB |
Output is correct |
15 |
Correct |
10 ms |
1272 KB |
Output is correct |
16 |
Correct |
10 ms |
1276 KB |
Output is correct |
17 |
Correct |
10 ms |
1124 KB |
Output is correct |
18 |
Correct |
10 ms |
1264 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
36 ms |
3492 KB |
Output is correct |
2 |
Correct |
39 ms |
3632 KB |
Output is correct |
3 |
Correct |
35 ms |
3512 KB |
Output is correct |
4 |
Correct |
25 ms |
2364 KB |
Output is correct |
5 |
Correct |
25 ms |
2748 KB |
Output is correct |
6 |
Correct |
25 ms |
2880 KB |
Output is correct |
7 |
Correct |
25 ms |
2484 KB |
Output is correct |
8 |
Correct |
25 ms |
2764 KB |
Output is correct |
9 |
Correct |
28 ms |
2868 KB |
Output is correct |
10 |
Correct |
24 ms |
2596 KB |
Output is correct |
11 |
Correct |
24 ms |
2628 KB |
Output is correct |
12 |
Correct |
23 ms |
2340 KB |
Output is correct |
13 |
Correct |
22 ms |
2340 KB |
Output is correct |
14 |
Correct |
25 ms |
2372 KB |
Output is correct |
15 |
Correct |
24 ms |
2364 KB |
Output is correct |
16 |
Correct |
24 ms |
2368 KB |
Output is correct |
17 |
Correct |
25 ms |
2616 KB |
Output is correct |
18 |
Correct |
26 ms |
2372 KB |
Output is correct |
19 |
Correct |
25 ms |
2616 KB |
Output is correct |
20 |
Correct |
20 ms |
2744 KB |
Output is correct |
21 |
Correct |
20 ms |
2500 KB |
Output is correct |
22 |
Correct |
25 ms |
2364 KB |
Output is correct |
23 |
Correct |
25 ms |
2756 KB |
Output is correct |
24 |
Correct |
25 ms |
2364 KB |
Output is correct |
25 |
Correct |
25 ms |
2744 KB |
Output is correct |
26 |
Correct |
25 ms |
2500 KB |
Output is correct |
27 |
Correct |
25 ms |
2744 KB |
Output is correct |
28 |
Correct |
26 ms |
2748 KB |
Output is correct |
29 |
Correct |
24 ms |
2504 KB |
Output is correct |
30 |
Correct |
24 ms |
2632 KB |
Output is correct |
31 |
Correct |
10 ms |
1276 KB |
Output is correct |
32 |
Correct |
10 ms |
1296 KB |
Output is correct |
33 |
Correct |
10 ms |
1272 KB |
Output is correct |
34 |
Correct |
10 ms |
1276 KB |
Output is correct |
35 |
Correct |
10 ms |
1280 KB |
Output is correct |
36 |
Correct |
8 ms |
1284 KB |
Output is correct |
37 |
Correct |
10 ms |
1268 KB |
Output is correct |
38 |
Correct |
9 ms |
1276 KB |
Output is correct |
39 |
Correct |
10 ms |
1280 KB |
Output is correct |
40 |
Correct |
8 ms |
1276 KB |
Output is correct |
41 |
Correct |
10 ms |
1528 KB |
Output is correct |
42 |
Correct |
10 ms |
1284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1272 KB |
Output is correct |
2 |
Correct |
8 ms |
1284 KB |
Output is correct |
3 |
Correct |
10 ms |
1160 KB |
Output is correct |
4 |
Incorrect |
11 ms |
1372 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
36 ms |
3548 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
36 ms |
3832 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |