Submission #778819

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

using namespace std;

#define int long long

void findTreasure(signed 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;
            cout<<flush;
            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;
    }

}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Invalid Access
2 Incorrect 1 ms 212 KB Invalid Access
3 Incorrect 1 ms 224 KB Invalid Access
4 Incorrect 1 ms 212 KB Invalid Access
5 Incorrect 4 ms 340 KB Invalid Access
6 Incorrect 6 ms 468 KB Invalid Access
7 Incorrect 9 ms 468 KB Invalid Access
8 Incorrect 13 ms 572 KB Invalid Access
9 Incorrect 14 ms 516 KB Invalid Access
10 Incorrect 15 ms 644 KB Invalid Access