Advertisement
Guest User

Untitled

a guest
Sep 8th, 2013
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5. #include <stack>
  6. #include <queue>
  7. #include <set>
  8. #include <map>
  9. #include <string>
  10. #include <algorithm>
  11. #include <iostream>
  12. using namespace std;
  13.  
  14. int p, a[10];
  15.  
  16. int main() {
  17.     //freopen("input.txt", "r", stdin);
  18.     //freopen("output.txt", "w", stdout);
  19.  
  20.     scanf("%d", &p);
  21.     for (int tst = 1; tst <= p; tst++) {
  22.         scanf("%*d");
  23.         for (int i = 0; i < 10; i++)
  24.             scanf("%d", &a[i]);
  25.         sort(a, a + 10);
  26.         printf("%d %d\n", tst, a[7]);
  27.     }
  28.    
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement