Submission #8404020
Source Code Expand
#include <iostream> #include <algorithm> using namespace std; #define REP(i,n) for(int i = 0; i < (int)n; i++) #define N_MAX 50000 #define M_MAX 50000 #define x_MAX 100 #define y_MAX 100 #define z_MAX 100 int N,M; int dp[105][105][105]; void solve() { int i,j,k,l,r,x,y,z; string s; cin>>N>>M; while(N--) cin>>x>>y>>z>>r, dp[x][y][z]=max(dp[x][y][z],r); FOR(x,101) FOR(y,101) FOR(z,101) { dp[x+1][y][z]=max(dp[x+1][y][z],dp[x][y][z]); dp[x][y+1][z]=max(dp[x][y+1][z],dp[x][y][z]); dp[x][y][z+1]=max(dp[x][y][z+1],dp[x][y][z]); } while(M--) cin>>x>>y>>z, cout<<dp[x][y][z]<<endl; } int main (){ solve(); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Optimal Recommendations |
User | molinuntius |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 691 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘void solve()’: ./Main.cpp:20:11: error: ‘FOR’ was not declared in this scope FOR(x,101) FOR(y,101) FOR(z,101) { ^