제출 #1304474

#제출 시각아이디문제언어결과실행 시간메모리
1304474nguyenhuuhongquanRotating Lines (APIO25_rotate)C++20
컴파일 에러
0 ms0 KiB
#include <vector>
using namespace std;
#define int long long
const int LimN = 1e5 + 5;
void rotate(std::vector<int> t, int x);
int a[LimN];
void energy(int n, std::vector<int> v){
    if (v[1] <= 12500) rotate({1}, 12500 - v[1]);
    else rotate({1}, 50000 - (12500 - v[1]));
    rotate({2}, 50000 - v[2]);


}

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

/usr/bin/ld: /tmp/ccCv1WVk.o: in function `energy(long long, std::vector<long long, std::allocator<long long> >)':
rotate.cpp:(.text+0x76): undefined reference to `rotate(std::vector<long long, std::allocator<long long> >, long long)'
/usr/bin/ld: rotate.cpp:(.text+0xd7): undefined reference to `rotate(std::vector<long long, std::allocator<long long> >, long long)'
/usr/bin/ld: rotate.cpp:(.text+0x155): undefined reference to `rotate(std::vector<long long, std::allocator<long long> >, long long)'
/usr/bin/ld: /tmp/ccJCtFch.o: in function `main':
grader.cpp:(.text.startup+0x278): undefined reference to `energy(int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status