이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "Alice.h"
using namespace std;
std::vector<std::pair<int,int>> Alice()
{
int N = 5000;
long long k = setN(N);
vector<pair<int,int>> edges;
edges.push_back({1,2});
edges.push_back({1,3});
for(int i=4;i<=N;i++)
{
int b = i%60;
if(((1LL<<b)&k))
{
edges.push_back({2,i});
}
else
{
edges.push_back({3,i});
}
}
return edges;
}
/**
1
/ \
2 3
/ \
A B
A = biti 1
B = biti 0
*/
#include <bits/stdc++.h>
#include "Bob.h"
// you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables.
// you had better not use the same global variables in function Alice() and in function Bob().
using namespace std;
long long Bob(std::vector<std::pair<int,int>> edges)
{
int N = 5000;
long long k=0;
for(auto [x,y]:edges)
{
if(x==2)
{
k = (k|(1LL<<(y%60)));
}
}
return k;
}
컴파일 시 표준 에러 (stderr) 메시지
Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:9:9: warning: unused variable 'N' [-Wunused-variable]
9 | int N = 5000;
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |