#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> H(N);
for (int i = 0; i < N; i++) {
cin >> H[i];
}
sort(H.begin(), H.end(), greater<int>());
int O = 0;
int T = -1;
for (int i = 0; i < N; i++) {
if (H[i] != T) {
O++;
T = H[i];
}
}
cout << O << endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
5 |
Incorrect |
140 ms |
3580 KB |
Output isn't correct |
6 |
Incorrect |
142 ms |
3664 KB |
Output isn't correct |
7 |
Incorrect |
119 ms |
3152 KB |
Output isn't correct |
8 |
Incorrect |
113 ms |
3320 KB |
Output isn't correct |
9 |
Incorrect |
142 ms |
3412 KB |
Output isn't correct |
10 |
Incorrect |
131 ms |
3528 KB |
Output isn't correct |