hiho week 65 register

Ended

Participants:3721

Verdict:Accepted
Score:100 / 100
Submitted:2015-09-27 00:11:13

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
//============================================================================
// Name        : test06.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct node{
    int dis;
    int index;
    node(){}
    node(int x,int y):dis(x),index(y){}
    //node(const node & h):dis(h.dis),index(h.index){}
    bool operator<(const node &h) const{
        return dis > h.dis;
    }
};
vector<double> highway(vector<int> &x,vector<int> &y,vector<int> &v){
    int n = x.size();
    vector<double> res(n),time(n);
    vector<node> distoi(n);
    for(int i = 0;i < n; i++){
        distoi[i] = node(x[i],i);
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX