5312专题

5312: 冒险

题解:链接 c++代码如下: #include<bits/stdc++.h>#define rep(i,x,y) for(register int i = x ;i <= y; ++ i)#define repd(i,x,y) for(register int i = x ; i >= y; -- i)using namespace std;typedef long long ll;

http://community.csdn.net/Expert/topic/5312/5312945.xml?temp=.5996363递归

public class RecTest {  static int[] values = new int[3];  static void printArray(int i) {    if (i == 0) return;//当i=0的时候返回,因为此时数组的下标为-1,所以没有输出    else printArray(i - 1);    System.out.println("["