Submission #20199

# Submission time Handle Problem Language Result Execution time Memory
20199 2016-03-13T03:32:06 Z jjim9417 개미 (GA4_ant) C++
48 / 100
62 ms 16 KB
#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main(void){
    int test;
    scanf("%d",&test);
    
    for (int i=0;i<test;i++){
        int arr[3];
        scanf("%d%d%d",&arr[0],&arr[1],&arr[2]);
        sort(arr,arr+3);
        printf("%llu\n",(unsigned long long)(arr[0]+arr[1])*(arr[0]+arr[1])+arr[2]*arr[2]);
    }
    
    return 0;
}

Compilation message

ant.cpp: In function 'int main()':
ant.cpp:9:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&test);
                      ^
ant.cpp:13:48: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d%d",&arr[0],&arr[1],&arr[2]);
                                                ^
# Verdict Execution time Memory Grader output
1 Correct 43 ms 1 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 3 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 46 ms 4 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 51 ms 5 KB Output isn't correct
2 Incorrect 51 ms 7 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 55 ms 8 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 56 ms 10 KB Output isn't correct
2 Incorrect 56 ms 11 KB Output isn't correct
3 Incorrect 62 ms 13 KB Output isn't correct
4 Incorrect 55 ms 15 KB Output isn't correct
5 Incorrect 57 ms 16 KB Output isn't correct