foo.cpp: In function 'void one::init()':
foo.cpp:15:32: error: 'scanf' was not declared in this scope
scanf("%d", sum + i);
^
foo.cpp: In function 'void one::work()':
foo.cpp:21:32: error: 'memset' was not declared in this scope
memset(dp, 0, sizeof dp);
^
foo.cpp:29:32: error: 'printf' was not declared in this scope
printf("%d\n", dp[N][K]);
^
foo.cpp: In function 'void two::init()':
foo.cpp:39:39: error: 'scanf' was not declared in this scope
scanf("%d", &sum[i][j]);
^
foo.cpp: In function 'void two::work()':
foo.cpp:45:32: error: 'memset' was not declared in this scope
memset(dp, 0, sizeof dp);
^
foo.cpp:66:35: error: 'printf' was not declared in this scope
printf("%d\n", dp[N][N][K]);
^