제출 #75458

#제출 시각아이디문제언어결과실행 시간메모리
75458Vasiljko보물 찾기 (CEOI13_treasure2)C++14
0 / 100
2 ms584 KiB
#include "treasure.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9+7; const int N = 105; int a[N][N]; bool found[N][N]; void findTreasure(int N){ int m=N/2; for(int i=1;i<=m;i++){ for(int j=1;j<=m;j++){ a[i][j]=countTreasure(1,1,i,j)-a[i-1][j]-a[i][j-1]+a[i-1][j-1]; if(a[i][j]==1)found[i][j]=1; } } memset(a,0,sizeof(a)); for(int i=1;i<=m;i++){ for(int j=N;j>=m+1;j--){ a[i][j]=countTreasure(1,j,i,N)-a[i][j+1]-a[i-1][j]+a[i-1][j+1]; if(a[i][j]==1)found[i][j]=1; } } memset(a,0,sizeof(a)); for(int i=N;i>=m+1;i--){ for(int j=1;j<=m;j++){ a[i][j]=countTreasure(i,1,N,j)-a[i][j-1]-a[i+1][j]+a[i+1][j-1]; if(a[i][j]==1)found[i][j]=1; } } memset(a,0,sizeof(a)); for(int i=N;i>=m+1;i--){ for(int j=N;j>=m+1;j--){ a[i][j]=countTreasure(i,j,N,N)-a[i+1][j]-a[i][j+1]+a[i+1][j+1]; if(a[i][j]==1)found[i][j]=1; } } for(int i=1;i<=N;i++){ for(int j=1;j<=N;j++){ } } }
#Verdict Execution timeMemoryGrader output
Fetching results...