# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99527 | ae04071 | Jakarta Skyscrapers (APIO15_skyscraper) | C++11 | 388 ms | 31144 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 <bits/stdc++.h>
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using namespace std;
using pii=pair<int,int>;
struct Data{
int b,p,idx;
Data() {}
Data(int b,int p,int idx=0):b(b),p(p),idx(idx){}
bool operator<(const Data &rhs)const {
if(p!=rhs.p) return p<rhs.p;
else if(b%p!=rhs.b%rhs.p) return b%p < rhs.b%rhs.p;
else return b<rhs.b;
}
};
int n,m;
vector<Data> arr[30000];
int vis[10000001];
queue<pair<int, Data>> que;
void push(int cost,Data v) {
if(v.b-v.p>=0 && !vis[v.idx-1]) {
vis[v.idx-1]=1;
que.push({cost,Data(v.b-v.p,v.p,v.idx-1)});
}
if(v.b+v.p<n && !vis[v.idx+1]) {
vis[v.idx+1]=1;
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... |