foo.cpp:1:1: error: 'include' does not name a type
include <iostream> include <stdio.h>
^
foo.cpp: In function 'int find(int, int)':
foo.cpp:20:51: error: 'min' was not declared in this scope
for( i = max( x - d , 0 ) ; i <= min( 128 , x + d ) ; i++ )
^
foo.cpp: In function 'int main()':
foo.cpp:29:18: error: 'scanf' was not declared in this scope
scanf( "%d" , &d );
^
foo.cpp:43:1: error: 'cout' was not declared in this scope
cout << sum << " " << maxd << endl;
^
foo.cpp:43:31: error: 'endl' was not declared in this scope
cout << sum << " " << maxd << endl;
^