제출 #1363976

#제출 시각아이디문제언어결과실행 시간메모리
1363976seungchan1eRotating Lines (APIO25_rotate)C++20
컴파일 에러
0 ms0 KiB
#ifndef ONLINE_JUDGE && EVAL
#include "grader.cpp"
#endif
#include "rotate.h"
#include <bits/stdc++.h>

using namespace std;

void energy(int n, std::vector<int> v){
    vector<int> p(n);
    iota(p.begin(), p.end(), 0);
    sort(p.begin(), p.end(), [&](int i, int j){return v[i] < v[j];});
    for(int i = 0; i < n; i++) {

    }
    rotate(p, 50000-v[p[0]]);
    for(int i = 0; i < n/2; i++) {
        rotate({p[i]}, 50000 - v[p[i]]);
        rotate({p[n-i-1]}, 25000 - v[p[n-i-1]]);
    }
}

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

rotate.cpp:1:22: warning: extra tokens at end of #ifndef directive
    1 | #ifndef ONLINE_JUDGE && EVAL
      |                      ^~
/usr/bin/ld: /tmp/ccmov009.o: in function `rotate(std::vector<int, std::allocator<int> >, int)':
grader.cpp:(.text+0x530): multiple definition of `rotate(std::vector<int, std::allocator<int> >, int)'; /tmp/cchc4jX7.o:rotate.cpp:(.text+0x9c0): first defined here
/usr/bin/ld: /tmp/ccmov009.o:(.bss+0x0): multiple definition of `Rotating_Lines::machine'; /tmp/cchc4jX7.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccmov009.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cchc4jX7.o:rotate.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status