Submission #778816

# Submission time Handle Problem Language Result Execution time Memory
778816 2023-07-10T18:13:54 Z anton Treasure (different grader from official contest) (CEOI13_treasure2) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>

using namespace std;

#define int long long

signed main(){
    int n;
    cin>>n;
    vector<vector<int>> s(n, vector<int> (n, 0));

    for(int x = 0; x<n; x++){
        for(int  y= 0; y<n; y++){
            cout<<1<<" "<<1<<" "<<x+1<<" "<<y+1<<endl;
            cin>>s[x][y];
        }
    }

    vector<vector<int>> v(n, vector<int> (n, 0));

    v[0][0] = s[0][0];
    for(int i = 1; i<n; i++){
        v[0][i] = s[0][i] - s[0][i-1];
    }
    for(int i = 1; i<n; i++){
        v[i][0] = s[i][0] - s[i-1][0];
    }
    for(int x= 1; x<n; x++){
        for(int y= 1; y<n; y++){
            v[x][y] = s[x][y] + s[x-1][y-1] - s[x-1][y] - s[x][y-1];
        }
    }

    cout<<"END"<<endl;

    for(int i = 0; i<n; i++){
        for(int j= 0; j<n; j++){
            cout<<v[i][j];
        }
        cout<<endl;
    }

}

Compilation message

/usr/bin/ld: /tmp/ccFApYpR.o: in function `main':
treasure.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccCbUZiU.o:grader.c:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccCbUZiU.o: in function `main':
grader.c:(.text.startup+0x103): undefined reference to `findTreasure(int)'
collect2: error: ld returned 1 exit status