# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
115654 | imyujin | Jakarta Skyscrapers (APIO15_skyscraper) | C++14 | 696 ms | 6120 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
#define MAXN 30005
#define MAXM 30005
#define LINF 8100000000ll
#define fi first
#define se second
typedef pair<int, int> pi;
long long dp[MAXN];
int B[MAXM], P[MAXM];
vector<int> d[MAXN];
priority_queue<pi, vector<pi>, greater<pi> > pq;
int main(){
int N, M;
scanf("%d%d", &N, &M);
for(int i=0; i<M; i++) scanf("%d%d", B+i, P+i);
for(int i=0; i<M; i++) d[B[i]].push_back(P[i]);
for(int i=0; i<N; i++){
sort(d[i].begin(), d[i].end());
unique(d[i].begin(), d[i].end());
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |