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_13725667_5442.cpp: In function 'void dectoB(int, int, short int*)':
0_0_13725667_5442.cpp:3:29: error: a function-definition is not allowed here before '{' token
 void copy(short *a,short *b){ int i; for(i=0;i<=b[0];i++)  a[i]=b[i];}
                             ^
0_0_13725667_5442.cpp:5:11: error: a function-definition is not allowed here before '{' token
 int main(){    int i,j,pos,n,k; short temp[105];/*思想:dpdp[n]=max(dp[i]*(n-i))     1<=i<n  同时为了保证没重复  f[][]做标记*/  //初始化处理  for(i=1;i<=1000;i++) dectoB(i,10,s[i]);  memset(f,0,sizeof(f));  dp[1][0]=1;dp[1][1]=1;f[1][1]=1;f[1][0]=1;  dp[2][0]=1;dp[2][1]=2;f[2][2]=1;f[2][0]=1;  dp[3][0]=1;dp[3][1]=3;f[3][3]=1;f[3][0]=1;  for(i=4;i<=1000;i++)  {       pos=i;    for(j=1;j<i;j++)    //if(f[j][i-j]==0&&dp[j]*(i-j)>dp[i]) //{dp[i]=dp[j]*(i-j);pos=j;}    if(f[j][i-j]==0) {  mult(dp[j],s[i-j],temp);
           ^
0_0_13725667_5442.cpp:6:50: error: expected '}' at end of input
   if(big(temp,dp[i]))  {copy(dp[i],temp);pos=j;} }
                                                  ^


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-26 13:03:13, Gzip enabled