foo.cpp:1:1: error: 'include' does not name a type
include <iostream> include <stdio.h> include <string.h>
^
foo.cpp: In function 'int main()':
foo.cpp:14:26: error: 'scanf' was not declared in this scope
while( scanf( "%d," , &x ) != EOF && x != -1 )
^
foo.cpp:14:31: error: 'EOF' was not declared in this scope
while( scanf( "%d," , &x ) != EOF && x != -1 )
^
foo.cpp:19:33: error: 'memset' was not declared in this scope
memset( pre , 0 , sizeof( pre ) );
^
foo.cpp:46:23: error: 'max' was not declared in this scope
ans = max( ans , f[i] );
^
foo.cpp:47:1: error: 'cout' was not declared in this scope
cout << ans << ",";
^
foo.cpp:51:1: error: 'cout' was not declared in this scope
cout << ans - 1 << endl;
^
foo.cpp:51:20: error: 'endl' was not declared in this scope
cout << ans - 1 << endl;
^
foo.cpp:52:17: error: 'system' was not declared in this scope
system( "pause" );
^