제출 #1118802

#제출 시각아이디문제언어결과실행 시간메모리
1118802RequiemCats or Dogs (JOI18_catdog)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define MOD 1000000007
#define inf 1e18
#define fi first
#define se second
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORD(i,a,b) for(int i=a;i>=b;i--)
#define sz(a) ((int)(a).size())
#define endl '\n'
#define pi 3.14159265359
#define TASKNAME "catdogs"
using namespace std;
template<typename T> bool maximize(T &res, const T &val) { if (res < val){ res = val; return true; }; return false; }
template<typename T> bool minimize(T &res, const T &val) { if (res > val){ res = val; return true; }; return false; }
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
/**
Cat / Dogs:

Cho 1 cây n đỉnh với n - 1 cạnh.

Một số đỉnh có màu đỏ / xanh.

Tìm tập cạnh tối thiểu sao cho:
==> trên đường đi giữa 1 cặp đỉnh xanh / đỏ bất kì đều tồn tại 1 cạnh trong tập đã chọn
**/
const int MAXN = 3e5 + 9;
int n;
ii edge[MAXN];
vector<int> g[MAXN];

void initialize(int N, vector<int> A, vector<int> B){

}

int cat(int u){

}

int dog(int u){

}

int neighbor(int u){

}

/**
Warning:
Đọc sai đề???
Cận lmao
Code imple thiếu case nào không.
Limit.
**/

컴파일 시 표준 에러 (stderr) 메시지

catdog.cpp: In function 'long long int cat(long long int)':
catdog.cpp:42:1: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | }
      | ^
catdog.cpp: In function 'long long int dog(long long int)':
catdog.cpp:46:1: warning: no return statement in function returning non-void [-Wreturn-type]
   46 | }
      | ^
catdog.cpp: In function 'long long int neighbor(long long int)':
catdog.cpp:50:1: warning: no return statement in function returning non-void [-Wreturn-type]
   50 | }
      | ^
/usr/bin/ld: /tmp/cc95FcPR.o: in function `main':
grader.cpp:(.text.startup+0x1e2): undefined reference to `initialize(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: grader.cpp:(.text.startup+0x219): undefined reference to `neighbor(int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x25e): undefined reference to `dog(int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x269): undefined reference to `cat(int)'
collect2: error: ld returned 1 exit status