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_13959915_13156.cpp: In function 'int getSG(int, int)':
0_0_13959915_13156.cpp:6:13: error: 'sg' was not declared in this scope
         if (sg[n] > -1) return sg[n];
             ^
0_0_13959915_13156.cpp:9:16: error: 'vis' was not declared in this scope
         memset(vis, 0, sizeof(vis));
                ^
0_0_13959915_13156.cpp:11:28: error: too few arguments to function 'int getSG(int, int)'
                 vis[getSG(i) ^ getSG(n - m - i)] = 1;
                            ^
0_0_13959915_13156.cpp:5:5: note: declared here
 int getSG(int n, int m){
     ^
0_0_13959915_13156.cpp:11:47: error: too few arguments to function 'int getSG(int, int)'
                 vis[getSG(i) ^ getSG(n - m - i)] = 1;
                                               ^
0_0_13959915_13156.cpp:5:5: note: declared here
 int getSG(int n, int m){
     ^
0_0_13959915_13156.cpp:15:25: error: 'sg' was not declared in this scope
                         sg[n] = i;
                         ^
0_0_13959915_13156.cpp:18:16: error: 'sg' was not declared in this scope
         return sg[n];
                ^
0_0_13959915_13156.cpp: In function 'int main()':
0_0_13959915_13156.cpp:25:24: error: 'sg' was not declared in this scope
                 memset(sg, -1, sizeof(sg));
                        ^
0_0_13959915_13156.cpp:27:32: error: 'n' was not declared in this scope
                 scanf("%d%d", &n, &m);
                                ^
0_0_13959915_13156.cpp:27:36: error: 'm' was not declared in this scope
                 scanf("%d%d", &n, &m);
                                    ^
0_0_13959915_13156.cpp:29:17: error: expected ';' before 'if'
                 if (getSG(n - m, m)) printf("abcdxyzk\n");   //相当于求 n - m 时不连城环
                 ^
0_0_13959915_13156.cpp:30:17: error: 'else' without a previous 'if'
                 else printf("aekdycoin\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-07-08 05:46:02, Gzip enabled