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_39451133_13401.cpp:12:8: error: 'N' was not declared in this scope
   12 | int p1[N], p2[N];
      |        ^
0_0_39451133_13401.cpp:12:15: error: 'N' was not declared in this scope
   12 | int p1[N], p2[N];
      |               ^
0_0_39451133_13401.cpp: In function 'void hash_init(int)':
0_0_39451133_13401.cpp:14:11: error: 'time' was not declared in this scope
   14 |     srand(time(nullptr));
      |           ^~~~
0_0_39451133_13401.cpp:1:1: note: 'time' is defined in header '<ctime>'; did you forget to '#include <ctime>'?
  +++ |+#include <ctime>
    1 | // #define HASH_REV
0_0_39451133_13401.cpp:14:5: error: 'srand' was not declared in this scope
   14 |     srand(time(nullptr));
      |     ^~~~~
0_0_39451133_13401.cpp:15:25: error: 'rand' was not declared in this scope
   15 |     Base1 = BASE_SET[0][rand() % 3];
      |                         ^~~~
0_0_39451133_13401.cpp:18:5: error: 'p1' was not declared in this scope
   18 |     p1[0] = 1; p2[0] = 1;
      |     ^~
0_0_39451133_13401.cpp:18:16: error: 'p2' was not declared in this scope
   18 |     p1[0] = 1; p2[0] = 1;
      |                ^~
0_0_39451133_13401.cpp: At global scope:
0_0_39451133_13401.cpp:52:16: error: expected ')' before '&' token
   52 |     Hash(string &s) {
      |         ~      ^~
      |                )
0_0_39451133_13401.cpp: In function 'Hash::HashCode operator+(const Hash::HashCode&, const Hash::HashCode&)':
0_0_39451133_13401.cpp:46:31: error: 'p1' was not declared in this scope; did you mean 'h1'?
   46 |             int s1 = (x.hc1 * p1[y.len] + y.hc1) % HM;
      |                               ^~
      |                               h1
0_0_39451133_13401.cpp:47:31: error: 'p2' was not declared in this scope; did you mean 'h2'?
   47 |             int s2 = (x.hc2 * p2[y.len] + y.hc2) % HM;
      |                               ^~
      |                               h2
0_0_39451133_13401.cpp: In member function 'Hash::HashCode Hash::sub(int, int)':
0_0_39451133_13401.cpp:105:40: error: 'p1' was not declared in this scope; did you mean 'h1'?
  105 |         int s1 = ((h1[r] - h1[l - 1] * p1[r - l + 1]) % HM + HM) % HM;
      |                                        ^~
      |                                        h1
0_0_39451133_13401.cpp:106:40: error: 'p2' was not declared in this scope; did you mean 'h2'?
  106 |         int s2 = ((h2[r] - h2[l - 1] * p2[r - l + 1]) % HM + HM) % HM;
      |                                        ^~
      |                                        h2
0_0_39451133_13401.cpp: At global scope:
0_0_39451133_13401.cpp:119:5: error: 'size_t' does not name a type
  119 |     size_t operator()(const HashCode& hc) const {
      |     ^~~~~~
0_0_39451133_13401.cpp:1:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
  +++ |+#include <cstddef>
    1 | // #define HASH_REV


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-25 09:56:24, Gzip enabled