F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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]);
                          ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-30 18:18:24, Gzip enabled