Skip to content

Commit 5957f75

Browse files
committed
[Gold IV] Title: 트리의 기둥과 가지, Time: 84 ms, Memory: 22292 KB -BaekjoonHub
1 parent 23f1e72 commit 5957f75

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

C++17/백준/Gold/20924. 트리의 기둥과 가지/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
### 성능 요약
66

7-
메모리: 22296 KB, 시간: 108 ms
7+
메모리: 22292 KB, 시간: 84 ms
88

99
### 분류
1010

1111
그래프 이론, 그래프 탐색, 트리, 깊이 우선 탐색
1212

1313
### 제출 일자
1414

15-
2026년 3월 1일 21:05:13
15+
2026년 3월 1일 21:12:44
1616

1717
### 문제 설명
1818

C++17/백준/Gold/20924. 트리의 기둥과 가지/트리의 기둥과 가지.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#include <iostream>
22
#include <vector>
3-
#include <cstring>
43
using namespace std;
5-
using pii = pair< int, int >;
4+
using pii = pair< int, uint16_t >;
65

76
const int N = 2e5 + 1;
87
int n, r, mn, mpn, r_to_m, mx_dist;
@@ -52,7 +51,9 @@ int main()
5251
cin >> n >> r;
5352
for ( int i = 0; i < n - 1; ++i )
5453
{
55-
int f, t, w; cin >> f >> t >> w;
54+
int f, t;
55+
uint16_t w;
56+
cin >> f >> t >> w;
5657
edges[ f ].push_back( { t, w } );
5758
edges[ t ].push_back( { f, w } );
5859
}

0 commit comments

Comments
 (0)