#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <assert.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <functional>
#include <vector>
#include <numeric>
#include <deque>
#include <utility>
#include <bitset>
#include <limits.h>
#include <iostream>
using namespace std;
typedef long long ll;
typedef unsigned long long llu;
typedef double lf;
typedef unsigned int uint;
typedef long double llf;
typedef pair<int, int> pii;
const int N_ = 4105;
const int M_ = 20005;
const int MAXW = 4105;
const int MAXD = 19999;
vector<int> events[MAXD+100000];
vector<pii> queries[MAXD+100000];
int answer[M_];
int S[N_], C[N_];
int N, P;
int M;
int stkF[N_][MAXW], topF;
int stkR[N_][MAXW], whR[N_], topR;
int main() {
scanf("%d%d", &N, &P);
for(int i = 1; i <= N; i++) {
int d; scanf("%d%d%d", &C[i], &S[i], &d);
events[d].push_back(i);
events[d + P].push_back(-i);
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Halted |
0 ms |
0 KB |
0 |
2 |
Halted |
0 ms |
0 KB |
0 |
3 |
Halted |
0 ms |
0 KB |
0 |
4 |
Halted |
0 ms |
0 KB |
0 |
5 |
Halted |
0 ms |
0 KB |
0 |
6 |
Halted |
0 ms |
0 KB |
0 |
7 |
Halted |
0 ms |
0 KB |
0 |
8 |
Halted |
0 ms |
0 KB |
0 |
9 |
Halted |
0 ms |
0 KB |
0 |
10 |
Halted |
0 ms |
0 KB |
0 |
11 |
Halted |
0 ms |
0 KB |
0 |
12 |
Halted |
0 ms |
0 KB |
0 |
13 |
Halted |
0 ms |
0 KB |
0 |
14 |
Halted |
0 ms |
0 KB |
0 |
15 |
Halted |
0 ms |
0 KB |
0 |
16 |
Halted |
0 ms |
0 KB |
0 |
17 |
Halted |
0 ms |
0 KB |
0 |
18 |
Halted |
0 ms |
0 KB |
0 |
19 |
Halted |
0 ms |
0 KB |
0 |
20 |
Halted |
0 ms |
0 KB |
0 |