# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
12732 | ainu7 | 일도양단! (kriii1_1) | C++98 | 0 ms | 2700 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <sstream>
#include <set>
using namespace std;
int R, C, H, N;
int dp[8][8][8][8][8][8];
int P[7][7][7];
int solve(int r1, int c1, int h1, int r2, int c2, int h2, int cnt) {
if (cnt == 1) return (r2-r1+1)*(c2-c1+1)*(h2-h1+1);
if (dp[r1][c1][h1][r2][c2][h2]) return dp[r1][c1][h1][r2][c2][h2];
int res = 0;
int cnt2 = 0;
for (int i=r1; i<r2; i++) {
for (int j=c1; j<=c2; j++)
for (int k=h1; k<=h2; k++)
cnt2 += P[i][j][k];
if (cnt2 == 0 || cnt2 == cnt) continue;
int now1 = solve(r1, c1, h1, i, c2, h2, cnt2);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |