답안 #544465

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
544465 2022-04-02T02:49:04 Z AbdelmagedNour 뒤집기 (IOI16_reverse) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    long long a[n];
    for(int i=0;i<n;i++)cin>>a[i];
    for(int i=n-1;i>=0;i--)cout<<a[i]<<" ";
    return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccKuNspK.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc8h0m4L.o:reverse.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccKuNspK.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