hiho week 189 register

Ended

Participants:100

Verdict:Accepted
Score:100 / 100
Submitted:2018-02-12 11:37:57

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
//
//  main.cpp
//  P
//
//  Created by Jiao Liu on 2/11/18.
//  Copyright © 2018 ChangHong. All rights reserved.
//
#include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
struct pet {
    int att;
    double percent;
};
int a[15],N,K;
double b[15],sumb;
int suma,sum;
vector<pet> group;
bool cmp(pet a, pet b)
{
    if (a.percent > b.percent) {
        return true;
    }
    if (a.percent == b.percent && a.att < b.att) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX