BOJ 9372 상근이의 여행

Jmnote (토론 | 기여)님의 2023년 12월 26일 (화) 00:54 판 (새 문서: ==개요== {{BOJ | 단계 = 37 | 분류1 = 그래프 이론 | 분류2 = 트리 }} ==C++== <syntaxhighlight lang='cpp'> #include <bits/stdc++.h> using namespace std; int main() {...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

BOJ 9372 상근이의 여행

2 C++[ | ]

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int T, N, M, a, b;
    cin >> T;
    while (T--) {
        cin >> N >> M;
        while (M--) {
            cin >> a >> b;
        }
        cout << N - 1 << endl;
    }
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}