# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
242941 | kai824 | Jakarta Skyscrapers (APIO15_skyscraper) | C++17 | 252 ms | 262144 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"
using namespace std;
#define int long long
#define mp make_pair
#define pii pair<int,int>
vector<pair<pii,int> > adjl[30000][180];//position, power, weight... if power==179, then it's dummy
bool used[30000][180];
int dist[30000][180],a,b,c;
priority_queue<pair<int,pii>,vector<pair<int,pii> >, greater<pair<int,pii> > > dijk;
//weight, pos, power
int32_t main(){
ios_base::sync_with_stdio(false);cin.tie(0);
int n,m,s,d,start,end;
cin>>n>>m;//m doges, n buildings
for(int x=0;x<n;x++){
for(int y=0;y<179;y++){
adjl[x][y].emplace_back(mp(x,179),0);
dist[x][y]=LLONG_MAX;
if(y>0){
if(x+y<n)adjl[x][y].emplace_back(mp(x+y,y),1);
if(x-y>=0)adjl[x][y].emplace_back(mp(x-y,y),1);
}
}
dist[x][179]=LLONG_MAX;
}
for(int x=0;x<m;x++){
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... |