foo.cpp:1:1: error: 'include' does not name a type
include<cstdio> include<algorithm>
^
foo.cpp: In function 'int find(double)':
foo.cpp:12:21: error: 'abs' was not declared in this scope
} if (abs(l[ll]-flag)>abs(l[rr]-flag)) return rr;
^
foo.cpp:7:8: warning: unused variable 'd' [-Wunused-variable]
double d;
^
foo.cpp: In function 'int main()':
foo.cpp:16:14: error: 'scanf' was not declared in this scope
scanf("%d",&n);
^
foo.cpp:18:1: error: 'sort' is not a member of 'std'
std::sort(l+1,l+1+n);
^
foo.cpp:22:15: error: 'abs' was not declared in this scope
if (abs(d-gold)<min) {
^
foo.cpp:26:28: error: 'printf' was not declared in this scope
} printf("%d\n%d",l[a],l[b]);
^
foo.cpp: In function 'int find(double)':
foo.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^