forked from ndb796/python-for-coding-test
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path7.cpp
More file actions
26 lines (20 loc) ยท 718 Bytes
/
7.cpp
File metadata and controls
26 lines (20 loc) ยท 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <bits/stdc++.h>
using namespace std;
// ํ(Row)์ด 3๊ฐ์ธ ์ธ์ ๋ฆฌ์คํธ ํํ
vector<pair<int, int> > graph[3];
int main(void) {
// ๋
ธ๋ 0์ ์ฐ๊ฒฐ๋ ๋
ธ๋ ์ ๋ณด ์ ์ฅ {๋
ธ๋, ๊ฑฐ๋ฆฌ}
graph[0].push_back({1, 7});
graph[0].push_back({2, 5});
// ๋
ธ๋ 1์ ์ฐ๊ฒฐ๋ ๋
ธ๋ ์ ๋ณด ์ ์ฅ {๋
ธ๋, ๊ฑฐ๋ฆฌ}
graph[1].push_back({0, 7});
// ๋
ธ๋ 2์ ์ฐ๊ฒฐ๋ ๋
ธ๋ ์ ๋ณด ์ ์ฅ {๋
ธ๋, ๊ฑฐ๋ฆฌ}
graph[2].push_back({0, 5});
// ๊ทธ๋ํ ์ถ๋ ฅ
for (int i = 0; i < 3; i++) {
for (int j = 0; j < graph[i].size(); j++) {
cout << '(' << graph[i][j].first << ',' << graph[i][j].second << ')' << ' ';
}
cout << '\n';
}
}