# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
118598 | roseanne_pcy | Pinball (JOI14_pinball) | C++14 | 2 ms | 356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
using namespace std;
#define X first
#define Y second
#define pb push_back
typedef pair<int, int> ii;
typedef long long ll;
const int maxn = 1e5+5;
int n, m;
int A[maxn], B[maxn], C[maxn], pay[maxn];
vector<int> cut;
map<int, int> bst;
struct node
{
ll L, R, fill;
node(){}
node(ll L, ll R, ll fill) : L(L), R(R), fill(fill){}
};
node st[12*maxn];
int main()
{
scanf("%d %d", &n, &m);
for(int i = 1; i<= n; i++)
{
scanf("%d %d %d %d", &A[i], &B[i], &C[i], &pay[i]);
cut.pb(A[i]); cut.pb(B[i]); cut.pb(C[i]);
}
sort(cut.begin(), cut.end());
cut.resize(unique(cut.begin(), cut.end())-cut.begin());
int cnt = 0;
if(cut[0] != 1) cnt++;
for(int x : cut)
{
cnt++;
bst[x] = cnt;
}
if(cut.back() != m) cnt++;
for(int i = 1; i<= n; i++)
{
A[i] = bst[A[i]];
B[i] = bst[B[i]];
C[i] = bst[C[i]];
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |