8000 Merge pull request #178 from hehehwang/0E-2750 · ingbeeedd/basic-algo-lecture@f54ba6f · GitHub
[go: up one dir, main page]

Skip to content

Commit f54ba6f

Browse files
Merge pull request encrypted-def#178 from hehehwang/0E-2750
Update 2750.cpp (2)
2 parents 3b9ce93 + 3b2febd commit f54ba6f

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

0x0E/solutions/2750.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
// Authored by : BaaaaaaaaaaarkingDog
1+
// Authored by : heheHwang
22
// Co-authored by : -
3-
// http://boj.kr/****************
3+
// http://boj.kr/801d75f3fc57460c94e9bd730172ad02
44
#include <bits/stdc++.h>
55
using namespace std;
66

7-
int main(void){
7+
const int MXN = 2000, HALF = MXN / 2;
8+
int main(void) {
89
ios::sync_with_stdio(0);
910
cin.tie(0);
10-
11+
12+
vector<bool> arr(MXN + 2);
13+
int N, t;
14+
cin >> N;
15+
while (N--) {
16+
cin >> t;
17+
arr[t + HALF] = true;
18+
}
19+
for (int i = 0; i <= MXN; i++)
20+
if (arr[i]) cout << i - HALF << '\n';
1121
}

0 commit comments

Comments
 (0)
0