0_0_38053463_23545.cpp: In function 'int main()':
0_0_38053463_23545.cpp:9:30: error: 'scanf' was not declared in this scope
while (~scanf("%d%d", &n, &k))
^
0_0_38053463_23545.cpp:11:25: error: 'memset' was not declared in this scope
memset(a, 0, sizeof(a));
^
0_0_38053463_23545.cpp:22:24: error: 'sort' was not declared in this scope
sort(a + 1, a + 1 + n);
^
0_0_38053463_23545.cpp:27:84: error: 'min' was not declared in this scope
dp[i][j] = min(dp[i - 1][j], dp[i - 2][j - 1] + (a[i] - a[i - 1])*(a[i]-a[i-1]));
^
0_0_38053463_23545.cpp:30:26: error: 'printf' was not declared in this scope
printf("%d\n", dp[n][k]);
^
|