Submission #3336

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
33362013-08-30 12:42:32wookayin일도양단! (kriii1_1)C++98
1 / 1
4 ms2132 KiB
#include <iostream>
#include <cstring>
#include <cstdio>
#include <vector>
using namespace std;
int R, C, H, N;
int has[7][7][7];
struct xyz {
int x, y, z;
xyz(int x, int y, int z) : x(x), y(y), z(z) {}
};
vector<xyz> pos;
int count(int r1, int r2, int c1, int c2, int h1, int h2) {
int s = 0;
for(int i = 0; i < pos.size(); ++ i) {
xyz &q = pos[i];
if(r1 <= q.x && q.x <= r2 && c1 <= q.y && q.y <= c2 && h1 <= q.z && q.z <= h2)
s ++;
}
return s;
}
int cache[7][7][7][7][7][7];
int go(int r1, int r2, int c1, int c2, int h1, int h2) {
int &ret = cache[r1][r2][c1][c2][h1][h2];
if(ret != -1) return ret;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...