hiho week 220 register

Ended

Participants:659

Verdict:Accepted
Score:100 / 100
Submitted:2018-09-22 11:14:41

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <stack>
using namespace std;
bool used[10];
vector<string> res;
void back(vector<int>& per, string str, int st) {
    if (st >= per.size()) {
        res.push_back(str.substr(0, str.size() - 1));
        return;
    }
    for (int i = st; i < per.size(); ++i) {
        if (i != st && per[i] < per[i - 1]) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX