| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 84743 | kjh5678 | 두 로봇 (KOI18_robot) | C++98 | 71 ms | 12280 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#if 01
#include <stdio.h>
#define MAX(x,y) ((x>y)?(x):(y))
int N, r1, r2;
typedef struct _idxarr
{
	int node;
	int dist;
	_idxarr* next;
	_idxarr(){ node = dist = 0; next = (_idxarr*)0; };
	_idxarr(int a, int b, _idxarr* c){ node = a; dist = b; next = c; }
}ia;
ia arr[100101];
int dist[100101];
int max[100101];
bool visit[100101];
void input()
{
	scanf("%d %d %d", &N, &r1, &r2);
	for (int i = 1; i <= N; i++)
	{
		int x, y, v;
		scanf("%d%d%d", &x, &y, &v);
		arr[x].next = new ia(y, v, arr[x].next);
		arr[y].next = new ia(x, v, arr[y].next);
	}
}
void DFS(int node, int d, int m)
{
	dist[node] = d;
	max[node] = m;
	visit[node] = true;
	for (ia* src = &arr[node]; src->next; src = src->next)
	{
		if (visit[src->next->node]) continue;
		DFS(src->next->node, d + src->next->dist, MAX(m, src->next->dist));
	}
}
int main()
{
	input();
	if (r1 == r2) { printf("0"); return 0; }
	DFS(r1, 0, 0);
	printf("%d", dist[r2] - max[r2]);
	return 1;
}
#endif
컴파일 시 표준 에러 (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... | ||||
