Submission #634124

# Submission time Handle Problem Language Result Execution time Memory
634124 2022-08-23T20:37:21 Z ahmed_shafik Reversing a Sequence (IOI16_reverse) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#define ahmed_is_fast             \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);
#define ll long long
#define ld long double
#define cc(n) cout << n << "\n"
#define ccc(n) cout << n << ' '
#define endl "\n"
#define all(v) v.begin(), v.end()
#define mx(a, b) a = max(a, b)
#define mn(a, b) a = min(a, b)
#define mem(a, b) memset(a, b, sizeof(a))
#define f(a) a.first
#define s(a) a.second
#define lcm(a, b) (a * b) / __gcd(a, b)
#define sp(x) setprecision(x)
using namespace std;
void ahmed()
{
    ll n;
    cin>>n;
    ll arr[n+9];
    for(ll i=0; i<n; i++)
    {
        cin>>arr[i];
    }
    for(ll i=n-1; i>=0; i--)
    {
        cout<<arr[i]<<' ';
    }
    cout<<endl;
}
bool AHMED = false;
int main()
{
    ahmed_is_fast;
    ll t = 1;
    if (AHMED)
    {
        cin >> t;
    }
    while (t--)
    {
        ahmed();
    }
    return 0;
}

Compilation message

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