# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99920 | MohamedAhmed0 | Jakarta Skyscrapers (APIO15_skyscraper) | C++14 | 298 ms | 67876 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;
int main()
{
int n , m ;
scanf("%d %d" , &n , &m) ;
vector< set<int> >v(n+1) ;
vector< vector< pair<int , int> > >adj(n+1) ;
int s , e ;
for(int i = 0 ; i < m ; ++i)
{
int a , b ;
scanf("%d %d" , &a , &b) ;
if(i == 0)
s = a ;
else if(i == 1)
e = a ;
v[a].insert(b) ;
}
for(int i = 0 ; i < n ; ++i)
{
for(auto &power : v[i])
{
for(int j = 1 ; ; ++j)
{
int here = i+power*j ;
if(here >= n)
break;
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... |