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

Skip to content

Commit 3cf4962

Browse files
Merge pull request encrypted-def#177 from hehehwang/0E-15688
Update 15688.cpp
2 parents 7ad3aaa + 07bde31 commit 3cf4962

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

0x0E/solutions/15688.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/ff8bea751284429baa8fd53b43f694d2
44
#include <bits/stdc++.h>
55
using namespace std;
66

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

0 commit comments

Comments
 (0)
0