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_39813784_28546.cpp: In function 'int calc(int, int, char)':
0_0_39813784_28546.cpp:17:15: error: expected ';' before 'return'
   17 |     if (l >= r return 0; // 如果区间无效直接返回0
      |               ^~~~~~~
      |               ;
0_0_39813784_28546.cpp:18:5: error: expected primary-expression before 'if'
   18 |     if (memo[l][r][c - 'a'] != -1) return memo[l][r][c - 'a']; // 检查记忆化数组
      |     ^~
0_0_39813784_28546.cpp:17:25: error: expected ')' before 'if'
   17 |     if (l >= r return 0; // 如果区间无效直接返回0
      |        ~                ^
      |                         )
   18 |     if (memo[l][r][c - 'a'] != -1) return memo[l][r][c - 'a']; // 检查记忆化数组
      |     ~~                   
0_0_39813784_28546.cpp:27:25: error: expected ')' before ';' token
   27 |     int mid = (l + r / 2;
      |               ~         ^
      |                         )
0_0_39813784_28546.cpp:29:43: error: expected primary-expression before ',' token
   29 |     int cnt2 = (r - l) /  - cont(mid, r - , c) + calc(l, mid, c + 1
      |                                           ^
0_0_39813784_28546.cpp:29:68: error: expected ')' before 'return'
   29 |     int cnt2 = (r - l) /  - cont(mid, r - , c) + calc(l, mid, c + 1
      |                                                      ~             ^
      |                                                                    )
   30 |     return memo[l][r][c - 'a'] = min(cnt1, cnt2);
      |     ~~~~~~                                                          
0_0_39813784_28546.cpp: In function 'int main()':
0_0_39813784_28546.cpp:37:15: error: expected primary-expression before ';' token
   37 |         cin >>;
      |               ^
0_0_39813784_28546.cpp:38:36: error: expected primary-expression before '(' token
   38 |  memo.assign(n, vector<vector<int>>(n, vector>(3 -1)));
      |                                    ^
0_0_39813784_28546.cpp:38:46: error: missing template arguments before '>' token
   38 |  memo.assign(n, vector<vector<int>>(n, vector>(3 -1)));
      |                                              ^


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-22 15:34:05, Gzip enabled