Submission #37074

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
370742017-12-21 02:13:38leejseoJakarta Skyscrapers (APIO15_skyscraper)C++11
100 / 100
443 ms8628 KiB
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
#define all(v) v.begin(), v.end()
#define maxint 2E9
struct Node{
int u;
int dist;
Node (int u_, int d_) {u = u_; dist = d_;}
bool operator < (const Node &a) const {return dist > a.dist;}
};
int N, M;
int B[30001];
int P[30001];
vector<int> V[30000];
int dist[30000];
void get_input(){
scanf("%d%d", &N, &M);
for (int i=0; i<M; i++) {
scanf("%d%d", &B[i], &P[i]);
V[B[i]].push_back(P[i]);
}
for (int i=0; i<N; i++) {
sort(all(V[i]));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

skyscraper.cpp: In function 'void dijkstra()':
skyscraper.cpp:50:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i=0; i < (V[u]).size(); i++){
                         ^
skyscraper.cpp: In function 'void get_input()':
skyscraper.cpp:24:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &N, &M);
                          ^
skyscraper.cpp:26:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d", &B[i], &P[i]);
                                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...