From 8cb3165f536dfb7b5d3b71df84b5e66c4d85756b Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Tue, 26 Jul 2016 20:19:27 +0800 Subject: [PATCH] Create 1033.cpp --- QUSTOJ/1033.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 QUSTOJ/1033.cpp diff --git a/QUSTOJ/1033.cpp b/QUSTOJ/1033.cpp new file mode 100644 index 0000000..751d4ee --- /dev/null +++ b/QUSTOJ/1033.cpp @@ -0,0 +1,36 @@ +#include +#include +#include +using namespace std; + +#define INF 0x3f3f3f3f +#define MAXN 21 +int pool[MAXN][MAXN][MAXN]; + +int w(int a,int b,int c) +{ + if(a<=0||b<=0||c<=0) return pool[0][0][0]; + else if(a>20||b>20||c>20) return w(20,20,20); + if(pool[a][b][c]!=INF) return pool[a][b][c]; + if(a