# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
758034 | jer033 | Grapevine (NOI22_grapevine) | C++17 | 52 ms | 16964 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 <algorithm>
#include <iostream>
int tree[2005][2005][2];
long long edgews[2005];
int grape[2005];
int bfs[2005];
int visited[2005];
long long dist[2005];//arrays that will be used in the solve function
using namespace std;
long long solve(int n, int qj, int tree[2005][2005][2], long long edgews[2005], int grape[2005], int bfs[2005], int visited[2005], long long dist[2005])
{
for (int i=0; i<=n+1; i++)
{
bfs[i]=0;
visited[i]=0;
dist[i]=0;//just to be sure
}
bfs[1]=qj;
dist[1]=0;
visited[qj]=1;
int explored=0;
int seen=1;
while (explored<n)//i want to explore all nodes
{
explored++;
int node=bfs[explored];
int edgecount=tree[node][0][0];
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |