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_37887228_71.cpp:7:1: error: expected initializer before 'int'
 int d[N], n, f[N];
 ^
0_0_37887228_71.cpp: In function 'void solve()':
0_0_37887228_71.cpp:11:18: error: 'n' was not declared in this scope
     scanf("%d", &n);
                  ^
0_0_37887228_71.cpp:13:33: error: 'd' was not declared in this scope
     for(int i = 1; i <= n; ++i) d[i] = f[i] = 0;
                                 ^
0_0_37887228_71.cpp:13:40: error: 'f' was not declared in this scope
     for(int i = 1; i <= n; ++i) d[i] = f[i] = 0;
                                        ^
0_0_37887228_71.cpp:17:9: error: 'f' was not declared in this scope
         f[i] = x;
         ^
0_0_37887228_71.cpp:18:9: error: 'd' was not declared in this scope
         d[f[i]]++;
         ^
0_0_37887228_71.cpp:21:37: error: 'd' was not declared in this scope
     for(int i = 1; i <= n; ++i) if(!d[i]) q[r++] = i;
                                     ^
0_0_37887228_71.cpp:24:16: error: 'd' was not declared in this scope
         if(!(--d[f[u]])) q[r++] = f[u];
                ^
0_0_37887228_71.cpp:24:18: error: 'f' was not declared in this scope
         if(!(--d[f[u]])) q[r++] = f[u];
                  ^
0_0_37887228_71.cpp:26:5: error: 'll' was not declared in this scope
     ll P = -1, Q = -1;
     ^
0_0_37887228_71.cpp:28:13: error: 'd' was not declared in this scope
         if(!d[i]) continue;
             ^
0_0_37887228_71.cpp:29:12: error: expected ';' before 'x'
         ll x = 0, y = 0;
            ^
0_0_37887228_71.cpp:30:24: error: 'd' was not declared in this scope
         for(int j = i; d[j]; j = f[j]) {
                        ^
0_0_37887228_71.cpp:30:34: error: 'f' was not declared in this scope
         for(int j = i; d[j]; j = f[j]) {
                                  ^
0_0_37887228_71.cpp:31:15: error: 'y' was not declared in this scope
             ++y;
               ^
0_0_37887228_71.cpp:32:13: error: 'x' was not declared in this scope
             x += j;
             ^
0_0_37887228_71.cpp:35:12: error: 'P' was not declared in this scope
         if(P == -1 && Q == -1) P = x, Q = y;
            ^
0_0_37887228_71.cpp:35:23: error: 'Q' was not declared in this scope
         if(P == -1 && Q == -1) P = x, Q = y;
                       ^
0_0_37887228_71.cpp:35:36: error: 'x' was not declared in this scope
         if(P == -1 && Q == -1) P = x, Q = y;
                                    ^
0_0_37887228_71.cpp:35:43: error: 'y' was not declared in this scope
         if(P == -1 && Q == -1) P = x, Q = y;
                                           ^
0_0_37887228_71.cpp:37:24: error: 'y' was not declared in this scope
             if(1ll*P * y != 1ll*x * Q) {
                        ^
0_0_37887228_71.cpp:37:33: error: 'x' was not declared in this scope
             if(1ll*P * y != 1ll*x * Q) {
                                 ^


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-29 18:44:40, Gzip enabled