Result

AC

Duration

529ms

Code [DL]

a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}

stdin

58 19 02
23 06 05
50 72 83
93 85 32

stdout

14056

stderr

/tmp/code.c:1:1: warning: data definition has no type or storage class
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
 ^
/tmp/code.c:1:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
/tmp/code.c:1:7: warning: data definition has no type or storage class
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
       ^
/tmp/code.c:1:7: warning: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
/tmp/code.c:1:9: warning: type defaults to 'int' in declaration of 'q' [-Wimplicit-int]
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
         ^
/tmp/code.c:1:11: warning: return type defaults to 'int' [-Wimplicit-int]
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
           ^~~~
/tmp/code.c: In function 'main':
/tmp/code.c:1:11: warning: type of 'p' defaults to 'int' [-Wimplicit-int]
/tmp/code.c:1:11: warning: type of 'z' defaults to 'int' [-Wimplicit-int]
/tmp/code.c:1:36: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
                                    ^~~~~
/tmp/code.c:1:36: warning: incompatible implicit declaration of built-in function 'scanf'
/tmp/code.c:1:36: note: include '<stdio.h>' or provide a declaration of 'scanf'
/tmp/code.c:1:105: warning: operation on 'p' may be undefined [-Wsequence-point]
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
                                                                                                        ~^~~~~~~~
/tmp/code.c:1:118: warning: operation on 'q' may be undefined [-Wsequence-point]
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
                                                                                                                     ~^~~~~~~~~~
/tmp/code.c:1:144: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
 a[12];s,q;main(p,z){z=12;for(;z--;)scanf("%d",a+z);for(z=9;z--;)a[z]-=a[9+z%3];for(z=3;z--;)s+=a[z]*=a[p=3+-~z%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3];printf("%d",s/6);}
                                                                                                                                                ^~~~~~
/tmp/code.c:1:144: warning: incompatible implicit declaration of built-in function 'printf'
/tmp/code.c:1:144: note: include '<stdio.h>' or provide a declaration of 'printf'

strace