#ifndef _Pbrngw_
#include "Alice.h"
#endif // _Pbrngw_
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(), (a).end()
#define task "kbsiudthw"
typedef vector<int> vi;
typedef pair<int32_t, int32_t> ii;
typedef pair<int, ii> pii;
const int N = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 2277;
vector<ii> Alice(){
int x = setN(5000);
vector<ii> edges;
vector<int> bit, zeros;
FOR (i, 0, 59) if ((x>>i)&1) bit.pb(i); else zeros.pb(i);
FOR (i, 61, 5000){
int x = i % (bit.size());
edges.pb({i, bit[x] + 1});
}
FOR (i, 0, (int)bit.size() - 2) edges.pb({bit[i]+1, bit[i+1]+1});
for (int &x : zeros) edges.pb({x + 1, bit[0] + 1});
assert(edges.size() == 4999);
return edges;
}
#ifdef _Pbrngw_
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
if (fopen(task".inp", "r")){
freopen(task".inp", "r", stdin);
freopen(task".out", "w", stdout);
}
return 0;
}
#endif // _Pbrngw_
#ifndef _Pbrngw_
#include "Bob.h"
#endif // _Pbrngw_
#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(), (a).end()
#define task "kbsiudthw"
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<int, ii> pii;
const int N = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 2277;
long long Bob(vector<ii> V){
vector<int> deg(5005, 0);
for (ii &x : V){
deg[x.fi]++;
deg[x.se]++;
}
int ans = 0;
FOR (i, 0, 59){
if (deg[i+1] > 1){
ans += (1ll<<i);
}
}
return ans;
}
#ifdef _Pbrngw_
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
if (fopen(task".inp", "r")){
freopen(task".inp", "r", stdin);
freopen(task".out", "w", stdout);
}
return 0;
}
#endif // _Pbrngw_
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |