Created
March 4, 2016 11:43
-
-
Save fa7ad/8491c04e9800b7ab2471 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
void clearIO() | |
{ | |
int ch; | |
while ((ch = std::cin.get()) != std::cin.eof() && ch != '\n'); | |
} | |
int main(int argc, char* argv[]) | |
{ | |
int cn; | |
std::cin >> cn; | |
cn = abs(cn); | |
if (cn <= 100) { | |
int inps[cn][3]; | |
clearIO(); | |
for (int i = 0; i < cn; i++) { | |
std::cin >> inps[i][0] >> inps[i][1] >> inps[i][2]; | |
clearIO(); | |
} | |
for (int d = 0; d < cn; d++) { | |
std::sort(inps[d], inps[d] + 3, std::greater<int>()); | |
std::cout << "Case " << d + 1 << ": " << inps[d][0] << std::endl; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment