반응형
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <iostream> #include <algorithm> using namespace std; int T,a[11]; int main() { cin >> T; while (T--) { for (int i = 1; i <= 10; i++) cin >> a[i]; sort(a + 1, a + 11); cout << a[8] << '\n'; } } | cs |
'Algorithm' 카테고리의 다른 글
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 4963번:섬의 개수(DFS) 답 (0) | 2017.02.08 |
---|---|
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 4963번:섬의 개수(BFS) 답 (0) | 2017.02.08 |
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 1932번:숫자삼각형 답 (0) | 2017.02.08 |
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 2667번:단지번호붙이기(DFS) 답 (0) | 2017.02.08 |
C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 2667번:단지번호붙이기(BFS) 답 (0) | 2017.02.08 |