답안 #829698

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
829698 2023-08-18T14:12:27 Z Blagoj 길고양이 (JOI20_stray) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "Anthony.h"

namespace {

int FunctionExample(int i, int A) { return i % A; }

}  // namespace

using namespace std;

vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
    vector<int> X(M);
	queue<int> q;
	q.push(0);
	string s = "001011";
	vector<int> g[N];
	for (int i = 0; i < M; i++) {
		g[U[i]].push_back(V[i]);
		g[V[i]].push_back(U[i]);
	}
	int dist[N];
	for (int i = 0; i < N; i++) dist[i] = N + 2;
	dist[0] = 0;
	while (q.size()) {
		int cur = q.front();
		q.pop();
		for (auto x : g[cur]) {
			if (dist[cur] + 1 < dist[x]) {
				dist[x] = dist[cur] + 1;
				q.push(x);
			}
		}
	}
	for (int i = 0; i < M; i++) X[i] = min(dist[U[i]], dist[V[i]]) % 3;
	// for (int i = 0; i < X.size(); i++) cout << U[i] << " " << V[i] << " : " << X[i] << endl;
    return X;
}



    

Compilation message

Anthony.cpp:6:5: warning: 'int {anonymous}::FunctionExample(int, int)' defined but not used [-Wunused-function]
    6 | int FunctionExample(int i, int A) { return i % A; }
      |     ^~~~~~~~~~~~~~~

/usr/bin/ld: /tmp/ccXUqfCF.o: in function `main':
grader_catherine.cpp:(.text.startup+0x41c): undefined reference to `Init(int, int)'
/usr/bin/ld: grader_catherine.cpp:(.text.startup+0xcfa): undefined reference to `Move(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status