이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> adj[20005];
int d[20005];
queue<int> q;
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V)
{
for (int i=0; i<M; i++)
{
adj[U[i]].push_back(V[i]);
adj[V[i]].push_back(U[i]);
}
d[0]=1;
q.push(0);
while (!q.empty())
{
int u=q.front();
q.pop();
for (int v:adj[u])
{
if (!d[v])
{
d[v]=d[u]+1;
q.push(v);
}
}
}
vector<int> ans;
for (int i=0; i<M; i++)
{
int x=min(d[U[i]], d[V[i]]);
if (A>2)
ans.push_back(x%3);
else
ans.push_back(x%6==0 || x%6==1 || x%6==4);
}
return ans;
}
#include "Catherine.h"
#include <bits/stdc++.h>
using namespace std;
int a;
void Init(int A, int B)
{
a=A;
}
int Move(vector<int> y)
{
if (a>=3)
{
if (y[0] && !y[2])
return 0;
else if (y[1] && !y[0])
return 1;
else
return 2;
}
}
컴파일 시 표준 에러 (stderr) 메시지
Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
20 | }
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |