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_29223095_10694.cpp: In function 'int main()':
0_0_29223095_10694.cpp:14:439: error: 'memset' was not declared in this scope
 return dp[pos][mod][hs]; int i,en,ans = 0,nhs,nmd; en = high? digit[pos]: 9; for(i = 0; i <= en; ++i) { nmd = (mod*10+i)%13; nhs = hs; if(nhs == 1 && i == 3) nhs = 2; else if(nhs != 2) nhs = (i == 1)? 1: 0; ans += dfs(pos-1,nmd,nhs,high && i == en); } if(!high) dp[pos][mod][hs] = ans; return ans; } int Solve(int x) { int len = 0; while(x) { digit[len++] = x%10; x /= 10; } return dfs(len-1,0,0,1); } int main() { memset(dp,-1,sizeof(dp)); int n; while(~scanf("%d",&n)) printf("%d\n",Solve(n)); return 0; } 
                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^


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-09-14 21:15:30, Gzip enabled