131
|
1 /* { dg-do run } */
|
|
2 /* { dg-options "-O2" } */
|
|
3
|
|
4 #include <vector>
|
|
5
|
|
6 #define N 10
|
|
7
|
|
8 static void visit(int &level, int n, int k, std::vector< int > &value) {
|
|
9 level = level + 1;
|
|
10 value[k] = level;
|
|
11 for (int i = 0 ; i < n; i++)
|
|
12 if (value[i] == 0)
|
|
13 visit(level, n, i, value);
|
|
14 }
|
|
15 void permutations()
|
|
16 {
|
|
17 std::vector< int > value(N);
|
|
18 int level = -1;
|
|
19 visit(level, N, 0, value);
|
|
20 }
|
|
21 void testExtendByBox() {
|
|
22 permutations();
|
|
23 }
|
|
24
|
|
25 int main() {
|
|
26 testExtendByBox();
|
|
27 return 0;
|
|
28 }
|