| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 31940 | chonka | 컴퓨터 네트워크 (BOI14_network) | C++98 | 169 ms | 6056 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "network.h"
#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std ;
#define MAXN 1007
int n ;
int st[ MAXN ] ;
int en[ MAXN ] ;
bool used[ MAXN ] ;
vector < int > v[ 2 * MAXN ];
bool cmp ( int x , int y ) {
return ( st[ x ] < st[ y ] ) ;
}
void findRoute ( int N, int a, int b ) {
int i ;
n = N ;
for ( i = 1 ; i <= n ; i ++ ) {
if ( i == a ) { continue ; }
st[ i ] = ping ( a , i ) ;
v[ st[ i ] ].push_back ( i ) ;
}
int dist = ping ( a , b ) ;
int x = b ;
vector < int > ret ;
while ( st[ x ] > 0 ) {
int sz = v[ st[ x ] - 1 ].size ( ) ;
for ( i = 0 ; i < sz ; i ++ ) {
if ( ping ( x , v[ st[ x ] - 1 ][ i ] ) == 0 ) {
x = v[ st[ x ] - 1 ][ i ] ;
ret.push_back ( x ) ;
break ;
}
}
}
int sz = ret.size ( ) ;
for ( i = sz - 1 ; i >= 0 ; i -- ) {
travelTo ( ret[ i ] ) ;
}
travelTo ( b ) ;
}
컴파일 시 표준 에러 (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... | ||||
