hiho week 202 register

Ended

Participants:109

Verdict:Accepted
Score:100 / 100
Submitted:2018-05-17 11:42:54

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 <cstdio>
#include <vector>
#include <utility>
#include <set>
#pragma warning(disable:4996)
using namespace std;
const int bign = 10033;
int cur[bign];
long long int id[bign];
int N,M,K;
int nowtime[bign];
int p[bign];
int o[bign][105], w[bign][105];
int lastime[105];
struct cmp
{
    bool operator()(const int&stu1, const int&stu2)const
    {
//      int t1 =  nowtime[stu1] + dist[stu1];
//      int t2 = nowtime[stu2] + dist[stu2];
        return (nowtime[stu1] < nowtime[stu2] || (nowtime[stu1] == nowtime[stu2] && id[stu1] < id[stu2]));
    }
};
set<int, cmp> ufinlist;
int main()
{
    scanf("%d%d%d", &N, &M, &K);
    for (int i=1; i <= N; i++)
    {
        scanf("%lld%d%d", &id[i], &nowtime[i], &p[i]);
        cur[i] = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX