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_39398794_14247.cpp: In function 'double fact(double)':
0_0_39398794_14247.cpp:12:9: error: invalid types 'double [10005][double]' for array subscript
   12 |     if(f[x]) return f[x];
      |         ^
0_0_39398794_14247.cpp:12:22: error: invalid types 'double [10005][double]' for array subscript
   12 |     if(f[x]) return f[x];
      |                      ^
0_0_39398794_14247.cpp:13:13: error: invalid types 'double [10005][double]' for array subscript
   13 |     return f[x] = fact(x-1)*x;
      |             ^
0_0_39398794_14247.cpp: In function 'int main()':
0_0_39398794_14247.cpp:19:38: error: invalid types 'double [10010][double]' for array subscript
   19 |                         scanf("%d",&b[i]);
      |                                      ^
0_0_39398794_14247.cpp:24:41: error: invalid types 'double [10010][double]' for array subscript
   24 |                         last2=min(last+b[i],m);
      |                                         ^
0_0_39398794_14247.cpp:26:42: error: invalid types 'double [10010][double]' for array subscript
   26 |                         for(int j=0; j<=b[i] && j<=last2; j++) {
      |                                          ^
0_0_39398794_14247.cpp:28:45: error: invalid types 'double [10010][double]' for array subscript
   28 |                                         temp[j+k]+=(double)sup[k]/fact(k);
      |                                             ^
0_0_39398794_14247.cpp:28:63: error: invalid types 'double [10010][double]' for array subscript
   28 |                                         temp[j+k]+=(double)sup[k]/fact(k);
      |                                                               ^
0_0_39398794_14247.cpp:35:42: error: invalid types 'double [10010][double]' for array subscript
   35 |                         printf("%d\n",sup[m]*fact(m));
      |                                          ^


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-24 18:47:31, Gzip enabled