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:22: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:32:18: error: 'scanf' was not declared in this scope
scanf( "%d" , &d );
^
foo.cpp:46:1: error: 'cout' was not declared in this scope
cout << sum << " " << maxd << endl;
^
foo.cpp:46:31: error: 'endl' was not declared in this scope
cout << sum << " " << maxd << endl;
^