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_39833029_12675.cpp:8:9: error: expected initializer before 's'
    8 | int m,n s;
      |         ^
0_0_39833029_12675.cpp: In function 'bool ok(int)':
0_0_39833029_12675.cpp:12:37: error: expected ';' before 'return'
   12 | if(a[x]==a[i] || abs(a[x]-a[i]==x-i)
      |                                     ^
      |                                     ;
   13 |   return 0;
      |   ~~~~~~                             
0_0_39833029_12675.cpp:14:1: error: expected primary-expression before 'return'
   14 | return 1;
      | ^~~~~~
0_0_39833029_12675.cpp:13:12: error: expected ')' before 'return'
   13 |   return 0;
      |            ^
      |            )
   14 | return 1;
      | ~~~~~~      
0_0_39833029_12675.cpp:12:3: note: to match this '('
   12 | if(a[x]==a[i] || abs(a[x]-a[i]==x-i)
      |   ^
0_0_39833029_12675.cpp: In function 'void dfs(int)':
0_0_39833029_12675.cpp:19:1: error: 's' was not declared in this scope
   19 | s++;
      | ^
0_0_39833029_12675.cpp:24:1: error: 'fds' was not declared in this scope; did you mean 'dfs'?
   24 | fds(x+1);
      | ^~~
      | dfs
0_0_39833029_12675.cpp: In function 'int main()':
0_0_39833029_12675.cpp:32:1: error: 's' was not declared in this scope
   32 | s=0;
      | ^
0_0_39833029_12675.cpp:36:21: error: 'n' was not declared in this scope
   36 | while (~scanf("%d",&n) &&n)
      |                     ^


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-12-04 18:00:13, Gzip enabled