This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
int n;
scanf("%d",&n);
while(n--){
long long int a[3],e;
scanf("%lld%lld%lld",&a[0],&a[1],&a[2]);
if(a[0]>a[1]){
e=a[0];
a[0]=a[1];
a[1]=e;
}if(a[0]>a[2]){
e=a[1];
a[1]=a[2];
a[2]=e;
}if(a[1]>a[2]){
e=a[1];
a[1]=a[2];
a[2]=e;
}
a[0]+=a[1];
printf("%lld\n",a[0]*a[0]+a[2]*a[2]);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |