hiho week 65 register

Ended

Participants:3721

Verdict:Accepted
Score:100 / 100
Submitted:2015-09-29 15:37: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<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn = 1000 + 10;
struct Node{
    int id;
    int x, y, v;
}node[maxn];
int y[maxn];
double t[maxn], ans[maxn];
bool cmp( const Node& node1, const Node& node2 ){
    if( node1.x == node2.x )
        return node1.y > node2.y;
    return node1.x > node2.x;
}
int main(){
    int n;
    scanf("%d", &n);
    memset( node, 0, sizeof(node) );
    memset( y, 0, sizeof(y) );
    for( int i = 1; i <= n; ++i ){
        scanf("%d%d%d", &node[i].x, &node[i].y, &node[i].v);
        y[i] = node[i].y, node[i].id = i;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX