답안 #1080248

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1080248 2024-08-29T08:19:12 Z Sir_Ahmed_Imran 기지국 (IOI20_stations) C++17
0 / 100
624 ms 776 KB
                            ///~~~LOTA~~~///
//#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define append push_back
#define add insert
#define nl '\n'
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define all(x) (x).begin(),(x).end()
#define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define terminator main
#define N 1000
int m;
int e[N];
vector<int> l;
vector<int> a[N];
void dfs(int v,int u){
    l[v]=m;
    m++;
    for(auto& i:a[v])
        if(i!=u) dfs(i,v);
}
vector<int> label(int n,int k,vector<int> u,vector<int> v){
    l.clear();
    for(int i=m=0;i<n;i++){
        a[i].clear();
        l.append(0);
        e[i]=0;
    }
    for(int i=0;i<n-1;i++){
        a[v[i]].append(u[i]);
        a[u[i]].append(v[i]);
        e[v[i]]++;
        e[u[i]]++;
    }
    for(int i=0;i<n;i++){
        if(e[i]>1) continue;
        dfs(i,-1);
    }
    return(l);
}
int find_next_station(int s,int t,vector<int> c){
    return s-(s>t)+(t>s);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 344 KB Invalid labels (values out of range). scenario=2, k=1000, vertex=0, label=1777
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 20 ms 344 KB Invalid labels (values out of range). scenario=0, k=1000, vertex=0, label=495021
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 347 ms 684 KB Output is correct
2 Correct 289 ms 684 KB Output is correct
3 Correct 613 ms 684 KB Output is correct
4 Correct 435 ms 684 KB Output is correct
5 Correct 402 ms 684 KB Output is correct
6 Correct 274 ms 684 KB Output is correct
7 Correct 317 ms 684 KB Output is correct
8 Correct 1 ms 776 KB Output is correct
9 Correct 1 ms 768 KB Output is correct
10 Correct 0 ms 776 KB Output is correct
11 Incorrect 423 ms 684 KB Wrong query response.
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 590 ms 684 KB Output is correct
2 Correct 435 ms 684 KB Output is correct
3 Correct 383 ms 716 KB Output is correct
4 Correct 1 ms 768 KB Output is correct
5 Correct 2 ms 768 KB Output is correct
6 Correct 0 ms 772 KB Output is correct
7 Incorrect 406 ms 684 KB Wrong query response.
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Partially correct 363 ms 684 KB Partially correct
2 Partially correct 307 ms 684 KB Partially correct
3 Correct 624 ms 684 KB Output is correct
4 Correct 457 ms 684 KB Output is correct
5 Correct 403 ms 684 KB Output is correct
6 Partially correct 323 ms 684 KB Partially correct
7 Partially correct 316 ms 684 KB Partially correct
8 Correct 2 ms 768 KB Output is correct
9 Correct 3 ms 768 KB Output is correct
10 Correct 0 ms 764 KB Output is correct
11 Incorrect 281 ms 684 KB Wrong query response.
12 Halted 0 ms 0 KB -