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_39645195_23507.cpp: In function 'long long int solve(long long int, long long int)':
0_0_39645195_23507.cpp:27:37: error: 'c' was not declared in this scope
   27 |     ll ans = 0, ival1 = power(val1, c), ival2 = inv(ival1), val2_k = power(power(val2, c), k);
      |                                     ^
0_0_39645195_23507.cpp:28:22: error: 'val2_k' was not declared in this scope; did you mean 'val2'?
   28 |     val1 = 1, val2 = val2_k;
      |                      ^~~~~~
      |                      val2
0_0_39645195_23507.cpp:30:26: error: 'k' was not declared in this scope
   30 |     for (int i = 0; i <= k; ++i) {
      |                          ^
0_0_39645195_23507.cpp:31:57: error: 'n' was not declared in this scope
   31 |         ll cur = val1 * val2 % mod, sum = (cur == 1) ? (n + 1) % mod : (power(cur, n + 1) - 1 + mod) % mod * inv((cur - 1 + mod) % mod) % mod;
      |                                                         ^
0_0_39645195_23507.cpp:33:50: error: 'ival2' was not declared in this scope; did you mean 'ival1'?
   33 |         val1 = val1 * ival1 % mod, val2 = val2 * ival2 % mod;
      |                                                  ^~~~~
      |                                                  ival1
0_0_39645195_23507.cpp: In function 'int main()':
0_0_39645195_23507.cpp:48:16: error: 'n' was not declared in this scope
   48 |         cin >> n >> c >> k;
      |                ^
0_0_39645195_23507.cpp:48:21: error: 'c' was not declared in this scope
   48 |         cin >> n >> c >> k;
      |                     ^
0_0_39645195_23507.cpp:48:26: error: 'k' was not declared in this scope
   48 |         cin >> n >> c >> k;
      |                          ^


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-26 09:26:39, Gzip enabled