# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99463 | Shafin666 | Jakarta Skyscrapers (APIO15_skyscraper) | C++14 | 379 ms | 68744 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 mp make_pair
#define pb push_back
#define pii pair<int, int>
typedef long long ll;
typedef long double ld;
using namespace std;
vector<int> adj[30005], cost[30005];
set<int> s[30005];
int b[30005], dist[30005];
int main()
{
int n, m;
int i, j, k;
int x, y;
cin >> n >> m;
for(int i = 0; i < m; i++) {
cin >> x >> y; b[i] = x;
s[x].insert(y);
}
for(int pos = 0; pos < n; pos++) {
dist[pos] = 1e9+7;
for(int p : s[pos]) {
for(int i = 1; ; i++) {
if(pos + i*p < n) {
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... |