Submission #1105662

# Submission time Handle Problem Language Result Execution time Memory
1105662 2024-10-27T08:39:05 Z KDM_Dvali Nile (IOI24_nile) C++17
Compilation error
0 ms 0 KB
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, q;
    cin >> n >> q;

 
    if (q > 5) {
        cerr << endl;
        return 1;
    }

    vector<int> W(n), A(n, 2), B(n, 1), E(q);

    for (int i = 0; i < n; i++) {
        W[i] = i + 1; 
    }

    for (int i = 0; i < q; i++) {
        cin >> E[i];
    }


    cout << "W: ";
    for (int w : W) cout << w << " ";
    cout << "\nA: ";
    for (int a : A) cout << a << " ";
    cout << "\nB: ";
    for (int b : B) cout << b << " ";
    cout << "\nE: ";
    for (int e : E) cout << e << " ";
    cout << endl;

    return 0;
}

Compilation message

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