# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2173 |
2013-07-20T06:56:56 Z |
minchurl |
개미 (GA4_ant) |
C++ |
|
0 ms |
0 KB |
#include<stdio.h>
long long x,y,z,dap;
FILE *in,*out
void input();
void solve();
void output();
int main(){
in=fopen("input.txt","r");
out=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);
}
Compilation message
ant.cpp:4: error: expected initializer before 'void'
ant.cpp: In function 'int main()':
ant.cpp:9: error: 'out' was not declared in this scope
ant.cpp:10: error: 'input' was not declared in this scope
ant.cpp: In function 'void input()':
ant.cpp:15: error: 't' was not declared in this scope
ant.cpp:17: warning: format '%d' expects type 'int*', but argument 3 has type 'long long int*'
ant.cpp:17: warning: format '%d' expects type 'int*', but argument 4 has type 'long long int*'
ant.cpp:17: warning: format '%d' expects type 'int*', but argument 5 has type 'long long int*'
ant.cpp: In function 'void output()':
ant.cpp:43: error: 'out' was not declared in this scope