# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20887 | 14kg | Jakarta Skyscrapers (APIO15_skyscraper) | C++11 | 153 ms | 33036 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>
#define N 30001
#define minus(x,y) (y?-(x):x)
#define Abs(x) (x>0?x:-(x))
#define LIMIT 1000
using namespace std;
typedef pair<int, pair<int, int> > pip;
int n, m, sw, ew, d[N];
bool check[N];
bool check2[N][LIMIT + 1];
vector<int> V[N];
queue<pip> Q;
int main() {
int x, y;
int w, p, c;
scanf("%d %d", &m, &n);
for (int i = 1; i <= n; i++) {
scanf("%d %d", &x, &y);
V[++x].push_back(y);
if (i == 1) sw = x;
if (i == 2) ew = x;
}
Q.push({ 0,{ sw,m + 1 } });
while (!Q.empty()) {
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... |