Submission #1041373

#TimeUsernameProblemLanguageResultExecution timeMemory
1041373arnavsrivastava0123Reversing a Sequence (IOI16_reverse)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define sz(x) x.size() #define pb push_back #define ll long long #define ld long double #define mp make_pair #define F first #define S second using namespace std; void solve(){ int n; cin >> n; ll a[n]; for(int i = 0; i < n;i++){ cin >> a[i]; } for(int i = n - 1; i >= 0;i--){ cout << a[i] << " \n"[i == 0]; } } int main(){ ios::sync_with_stdio(false); cin.tie(0); solve(); }

Compilation message (stderr)

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