답안 #778825

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
778825 2023-07-10T18:31:14 Z anton 보물 찾기 (CEOI13_treasure2) C++17
44 / 100
1 ms 468 KB
#include<bits/stdc++.h>
#include "treasure.h"

using namespace std;

#define int long long

void findTreasure(signed n){
    vector<vector<int>> s(n, vector<int> (n, 0));

    for(int x = 0; x<n; x++){
        for(int  y= 0; y<n; y++){
            s[x][y] = countTreasure(1, 1, x+1, y+1);
        }
    }

    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];
        }
    }

    for(int i = 0; i<n; i++){
        for(int j= 0; j<n; j++){
            if(v[i][j] ==1){
                Report(i+1, j+1);
            }
        }
    }

}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 0 ms 212 KB Output is partially correct - N = 5, K = 425, score = 8
2 Partially correct 0 ms 212 KB Output is partially correct - N = 10, K = 7075, score = 4
3 Partially correct 1 ms 320 KB Output is partially correct - N = 15, K = 36450, score = 4
4 Partially correct 0 ms 212 KB Output is partially correct - N = 16, K = 47296, score = 4
5 Partially correct 0 ms 340 KB Output is partially correct - N = 55, K = 6782050, score = 4
6 Partially correct 1 ms 340 KB Output is partially correct - N = 66, K = 14090571, score = 4
7 Partially correct 0 ms 340 KB Output is partially correct - N = 77, K = 26140961, score = 4
8 Partially correct 0 ms 468 KB Output is partially correct - N = 88, K = 44642224, score = 4
9 Partially correct 1 ms 468 KB Output is partially correct - N = 99, K = 71566902, score = 4
10 Partially correct 1 ms 468 KB Output is partially correct - N = 100, K = 74507500, score = 4