Submission #10337142


Source Code Expand

Copy
#define r fmin(h-a,a)
#define f(h,a)((r/3-h/2.)*r/(h-a)+a)*r/(h-a)
main(h,w,a,b){scanf("%d%d%d%d",&h,&w,&a,&b);printf("%.9f",4*f(h,a)*f(w,b));}

Submission Info

Submission Time
Task A - Affiches
User kyopro_friends
Language C (GCC 5.4.1)
Score 0
Code Size 145 Byte
Status
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(h,w,a,b){scanf("%d%d%d%d",&h,&w,&a,&b);printf("%.9f",4*f(h,a)*f(w,b));}
 ^
./Main.c: In function ‘main’:
./Main.c:3:1: warning: type of ‘h’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:3:1: warning: type of ‘w’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:3:1: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:3:1: warning: type of ‘b’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:3:15: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 main(h,w,a,b){scanf("%d%d%d%d",&h,&w,&a,&b);printf("%.9f",4*f(h,a)*f(w,b));}
               ^
./Main.c:3:15: warning: incompatible implicit declaration of built-in function ‘scanf’
./Main.c:3:15: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
./Main.c:3:45: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 main(h,w,a,b){scanf("%d%d%d%d",&h,&w,&a,&b);printf("%.9f",4*f(h,a)*f(w,b));}
                           ...

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 01.txt, 02.txt
All 0 / 500 01.txt, 02.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt
Case Name Status Exec Time Memory
01.txt 1 ms 128 KB
02.txt 1 ms 128 KB
10.txt 1 ms 128 KB
11.txt 1 ms 128 KB
12.txt 1 ms 128 KB
13.txt 1 ms 128 KB
14.txt 1 ms 128 KB
15.txt 1 ms 128 KB
16.txt 1 ms 128 KB
17.txt 1 ms 128 KB
18.txt 1 ms 128 KB
19.txt 1 ms 128 KB