foo.cc:24:2: error: stray ‘#’ in program
24 | }#include<bits/stdc++.h>
| ^
foo.cc: In function ‘int check(int)’:
foo.cc:8:42: error: expected ‘;’ before ‘y’
8 | cnt=ceil(1.0*(y-m)/(b-a))
| ^
| ;
9 | y-=cnt*(b-a);
| ~
foo.cc: In function ‘int main()’:
foo.cc:19:26: error: ‘l’ was not declared in this scope
19 | int mid=(l+m)/2;
| ^
foo.cc: At global scope:
foo.cc:24:3: error: ‘include’ does not name a type
24 | }#include<bits/stdc++.h>
| ^~~~~~~
foo.cc:26:5: error: redefinition of ‘int m’
26 | int m,n,a,b,ans;
| ^
foo.cc:3:5: note: ‘int m’ previously declared here
3 | int m,n,a,b,ans;
| ^
foo.cc:26:7: error: redefinition of ‘int n’
26 | int m,n,a,b,ans;
| ^
foo.cc:3:7: note: ‘int n’ previously declared here
3 | int m,n,a,b,ans;
| ^
foo.cc:26:9: error: redefinition of ‘int a’
26 | int m,n,a,b,ans;
| ^
foo.cc:3:9: note: ‘int a’ previously declared here
3 | int m,n,a,b,ans;
| ^
foo.cc:26:11: error: redefinition of ‘int b’
26 | int m,n,a,b,ans;
| ^
foo.cc:3:11: note: ‘int b’ previously declared here
3 | int m,n,a,b,ans;
| ^
foo.cc:26:13: error: redefinition of ‘int ans’
26 | int m,n,a,b,ans;
| ^~~
foo.cc:3:13: note: ‘int ans’ previously declared here
3 | int m,n,a,b,ans;
| ^~~
foo.cc:27:5: error: redefinition of ‘int check(int)’
27 | int check(int z){
| ^~~~~
foo.cc:4:5: note: ‘int check(int)’ previously defined here
4 | int check(int z){
| ^~~~~
foo.cc: In function ‘int check(int)’:
foo.cc:31:42: error: expected ‘;’ before ‘y’
31 | cnt=ceil(1.0*(y-m)/(b-a))
| ^
| ;
32 | y-=cnt*(b-a);
| ~
foo.cc: At global scope:
foo.cc:37:5: error: redefinition of ‘int main()’
37 | int main(){
| ^~~~
foo.cc:14:5: note: ‘int main()’ previously defined here
14 | int main(){
| ^~~~
foo.cc: In function ‘int main()’:
foo.cc:42:26: error: ‘l’ was not declared in this scope
42 | int mid=(l+m)/2;
| ^