hiho week 38 register

Ended

Participants:420

Verdict:Accepted
Score:100 / 100
Submitted:2015-03-22 16:51:52

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 <vector>
#include <iostream>
using namespace std; 
const int NEWSZ = 10010;
const int MAX_VAL = 1000000;
int ans;
struct Edge {
    int id;
    int weight;
    Edge(int i, int w) : id(i), weight(w) {
    }
}; 
vector<Edge> G[NEWSZ];
int n, m, k, t;
bool possible(int val) {
    vector<int> nodes, nodes_backup;
    int node = 1;
    vector<int> visited(n + 1, false);
    nodes.push_back(1);
    int bk = k;
    while (bk > 0) {
        bk--;
        for (int i = 0; i<nodes.size(); i++) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX