답안 #440000

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
440000 2021-07-01T11:26:28 Z Aurora2005 뒤집기 (IOI16_reverse) C++14
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<long long int> A(N);
  for(int i=0;i<N;i++) cin >> A[i];
  reverse(A.begin(),A.end());
  cout << A[0];
  for(int i=1;i<N;i++) cout << " " << A[i];
  cout << endl;
}

Compilation message

/usr/bin/ld: /tmp/cc8EBqjK.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccd40kHK.o:reverse.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc8EBqjK.o: in function `main':
grader.cpp:(.text.startup+0x17d): undefined reference to `reverse(std::vector<long long, std::allocator<long long> >)'
collect2: error: ld returned 1 exit status