C - C Time Limit:500MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Description The people of Mohammadpur have decided to paint each of their houses red, green, or blue. They've also decided that no two neighboring houses will be painte…
lightOJ 1047 Neighbor House (DP) 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87730#problem/C 题目: Description The people of Mohammadpur have decided to paint each of their houses red, green, or blue. They've also decided that no two n…
Neighbor House LightOJ - 1047 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int T,TT,n; ][],ans[][]; int main() { int i,j,k; scanf("%d",&T); ;TT<=T;TT++) { scanf("%d",&n); ;i&l…