# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2175 |
2013-07-20T07:00:34 Z |
minchurl |
개미 (GA4_ant) |
C++ |
|
57 ms |
884 KB |
#include<stdio.h>
int t;
long long x,y,z,dap;
FILE *in,*out;
void input();
void solve();
void output();
int main(){
in=stdin;//fopen("input.txt","r");
out=stdout;//fopen("output.txt","w");
input();
return 0;
}
void input(){
int i;
fscanf(in,"%d",&t);
for(i=0;i<t;i++){
fscanf(in,"%d %d %d",&x,&y,&z);
solve();
output();
}
}
void solve(){
long long a,b,c;
dap=0;
a=(x*x)+((y+z)*(y+z));
b=(y*y)+((x+z)*(x+z));
c=(z*z)+((x+y)*(x+y));
if(a>b){
if(a>c){
dap=a;
}else{
dap=c;
}
}else{
if(b>c){
dap=b;
}else{
dap=c;
}
}
}
void output(){
fprintf(out,"%lld\n",dap);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
43 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
45 ms |
884 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
57 ms |
884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
54 ms |
884 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
54 ms |
884 KB |
Output is correct |
2 |
Incorrect |
54 ms |
884 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |