이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
typedef long long ll;
ll min(ll a,ll b){ if(!a && !b) return 1LL<<60; if(!a) return b; if(!b) return a; return a>b?b:a;}
ll min(ll a,ll b,ll c){ if(a+b+c==0) return 0; return min(min(a,b),c);}
int main(){
int tc;
scanf("%d",&tc);
int a,b,c;
for(;tc--;){
scanf("%d%d%d",&a,&b,&c);
printf("%I64d\n",1ll*a*a+1ll*b*b+1ll*c*c+min(2ll*a*b,2ll*b*c,2ll*c*a));
}
return 0;
}
# | 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... |