# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
778819 | anton | 보물 찾기 (CEOI13_treasure2) | C++17 | 15 ms | 644 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 |
---|---|---|---|---|
Fetching results... |