hiho week 50 register

Ended

Participants:436

Verdict:Accepted
Score:100 / 100
Submitted:2015-06-20 15:16:07

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
//#define WU
#include <stdio.h>
#include <iostream>
#include <functional>
#include <algorithm>
#include <utility>
#include <string>
#include <vector>
#include <set>
#include <map>
//#include <unordered_set>
//#include <unordered_map>
using namespace std;
typedef long long ll;
vector<int > edge[1005];
void fleury(int p) {
    while(!edge[p].empty()) {
        int q = edge[p][0];
        edge[p].erase(edge[p].begin());
        for(int i=0; i<edge[q].size(); ++i) {
            if(edge[q][i]==p) {
                edge[q].erase(edge[q].begin()+i);
                break;
            }
        }
        fleury(q);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX