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_38900392_26463.cpp:8:11: error: 'int64_t' does not name a type
    8 | constexpr int64_t MOD = 10000007;
      |           ^~~~~~~
0_0_38900392_26463.cpp:5:1: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    4 | #include <vector>
  +++ |+#include <cstdint>
    5 | #pragma GCC target("avx2,avx,mmx,fma")
0_0_38900392_26463.cpp:10:18: error: 'int64_t' was not declared in this scope
   10 | typedef valarray<int64_t> vec;
      |                  ^~~~~~~
0_0_38900392_26463.cpp:10:18: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
0_0_38900392_26463.cpp:10:25: error: template argument 1 is invalid
   10 | typedef valarray<int64_t> vec;
      |                         ^
0_0_38900392_26463.cpp: In function 'mat operator*(const mat&, const mat&)':
0_0_38900392_26463.cpp:15:32: error: request for member 'size' in '(& a)->std::vector<int>::operator[](0)', which is of non-class type 'const __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'const int'}
   15 |     int n = a.size(), t = a[0].size(), m = b[0].size();
      |                                ^~~~
0_0_38900392_26463.cpp:16:20: error: 'm' was not declared in this scope
   16 |     mat ret(n, vec(m));
      |                    ^
0_0_38900392_26463.cpp:21:14: error: invalid types 'vec {aka int}[int]' for array subscript
   21 |             T[k] = b[k][j];
      |              ^
0_0_38900392_26463.cpp:21:24: error: invalid types 'const __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka const int}[int]' for array subscript
   21 |             T[k] = b[k][j];
      |                        ^
0_0_38900392_26463.cpp:24:19: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   24 |             ret[i][j] = (a[i] * T % MOD).sum() % MOD;
      |                   ^
0_0_38900392_26463.cpp:24:37: error: 'MOD' was not declared in this scope
   24 |             ret[i][j] = (a[i] * T % MOD).sum() % MOD;
      |                                     ^~~
0_0_38900392_26463.cpp: At global scope:
0_0_38900392_26463.cpp:31:17: error: 'int64_t' has not been declared
   31 | mat pow(mat& a, int64_t n) {
      |                 ^~~~~~~
0_0_38900392_26463.cpp: In function 'mat pow(mat&, int)':
0_0_38900392_26463.cpp:35:15: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   35 |         ret[i][i] = 1;
      |               ^
0_0_38900392_26463.cpp: At global scope:
0_0_38900392_26463.cpp:47:1: error: 'int64_t' does not name a type
   47 | int64_t I[100008];
      | ^~~~~~~
0_0_38900392_26463.cpp:47:1: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
0_0_38900392_26463.cpp: In function 'int main()':
0_0_38900392_26463.cpp:52:5: error: 'int64_t' was not declared in this scope
   52 |     int64_t k;
      |     ^~~~~~~
0_0_38900392_26463.cpp:52:5: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
0_0_38900392_26463.cpp:53:33: error: 'k' was not declared in this scope
   53 |     while(~scanf("%d%lld", &n, &k));
      |                                 ^
0_0_38900392_26463.cpp:54:16: error: expected ';' before 'sum'
   54 |         int64_t sum = 0;
      |                ^~~~
      |                ;
0_0_38900392_26463.cpp:56:27: error: 'I' was not declared in this scope
   56 |             scanf("%lld", I + i);
      |                           ^
0_0_38900392_26463.cpp:57:13: error: 'sum' was not declared in this scope
   57 |             sum += I[i];
      |             ^~~
0_0_38900392_26463.cpp:59:13: error: 'k' was not declared in this scope
   59 |         if(!k) {
      |             ^
0_0_38900392_26463.cpp:60:38: error: 'sum' was not declared in this scope
   60 |                 return printf("%lld",sum), 0;
      |                                      ^~~
0_0_38900392_26463.cpp:62:14: error: 'I' was not declared in this scope
   62 |         sort(I, I + n);
      |              ^
0_0_38900392_26463.cpp:70:16: error: expected ';' before 'p'
   70 |         int64_t p = I[n - 2], q = I[n - 1];
      |                ^~
      |                ;
0_0_38900392_26463.cpp:71:57: error: could not convert '{{1, 1, 1}, {0, 1, 1}, {0, 1, 0}}' from '<brace-enclosed initializer list>' to 'mat' {aka 'std::vector<int>'}
   71 |         mat a = { { 1, 1, 1 }, { 0, 1, 1 }, { 0, 1, 0 } };
      |                                                         ^
      |                                                         |
      |                                                         <brace-enclosed initializer list>
0_0_38900392_26463.cpp:72:26: error: 'k' was not declared in this scope
   72 |         mat ans = pow(a, k) * mat({ { 1 }, { 1 }, { 0 } });
      |                          ^
0_0_38900392_26463.cpp:73:16: error: expected ';' before 'P'
   73 |         int64_t P = (ans[0][0] - ans[1][0]) % MOD,
      |                ^~
      |                ;
0_0_38900392_26463.cpp:75:27: error: 'p' was not declared in this scope
   75 |         printf("%lld", (((p * P) % MOD + (q * Q) % MOD + sum) % MOD + MOD) % MOD);
      |                           ^
0_0_38900392_26463.cpp:75:31: error: 'P' was not declared in this scope
   75 |         printf("%lld", (((p * P) % MOD + (q * Q) % MOD + sum) % MOD + MOD) % MOD);
      |                               ^
0_0_38900392_26463.cpp:75:36: error: 'MOD' was not declared in this scope
   75 |         printf("%lld", (((p * P) % MOD + (q * Q) % MOD + sum) % MOD + MOD) % MOD);
      |                                    ^~~
0_0_38900392_26463.cpp:75:43: error: 'q' was not declared in this scope
   75 |         printf("%lld", (((p * P) % MOD + (q * Q) % MOD + sum) % MOD + MOD) % MOD);
      |                                           ^
0_0_38900392_26463.cpp:75:47: error: 'Q' was not declared in this scope
   75 |         printf("%lld", (((p * P) % MOD + (q * Q) % MOD + sum) % MOD + MOD) % MOD);
      |                                               ^
0_0_38900392_26463.cpp:75:58: error: 'sum' was not declared in this scope
   75 |         printf("%lld", (((p * P) % MOD + (q * Q) % MOD + sum) % MOD + MOD) % MOD);
      |                                                          ^~~
0_0_38900392_26463.cpp: At global scope:
0_0_38900392_26463.cpp:77:5: error: expected unqualified-id before 'return'
   77 |     return 0;
      |     ^~~~~~
0_0_38900392_26463.cpp:78:1: error: expected declaration before '}' token
   78 | }
      | ^


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-23 00:56:06, Gzip enabled