# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
9159 | pichulia | Your life (kriii2_Y) | C++98 | 88 ms | 11404 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<algorithm>
#include<vector>
using namespace std;
typedef pair<int, int> pii;
int n,m;
int d[200000];
int queue[200000];
int q,r;
vector<int> v[200000];
int mark[200000];
int main()
{
scanf("%d %d",&n,&m);
int i, j, k;
for(i=0;i<n;i++)
d[i] = 1000000000;
queue[0] = 0;
q=0;r=1;
while(m--)
{
scanf("%d %d",&i,&j);
i--;j--;
v[i].push_back(j);
}
d[0] = 0;
while(q<r)
{
int qi = queue[q];
for(i=0;i<v[qi].size();i++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |