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_37851531_938.cpp:88:19: error: 'mod' is not a valid template argument for type 'const int&' because object 'mod' has not external linkage
 using Mint = Z<mod>;
                   ^
0_0_37851531_938.cpp: In function 'int main()':
0_0_37851531_938.cpp:98:10: error: 'Mint' was not declared in this scope
   vector<Mint> f(m, 1), g(m), psg(m + 1);
          ^
0_0_37851531_938.cpp:98:14: error: template argument 1 is invalid
   vector<Mint> f(m, 1), g(m), psg(m + 1);
              ^
0_0_37851531_938.cpp:98:14: error: template argument 2 is invalid
0_0_37851531_938.cpp:98:17: error: invalid type in declaration before '(' token
   vector<Mint> f(m, 1), g(m), psg(m + 1);
                 ^
0_0_37851531_938.cpp:98:22: error: expression list treated as compound expression in initializer [-fpermissive]
   vector<Mint> f(m, 1), g(m), psg(m + 1);
                      ^
0_0_37851531_938.cpp:100:11: error: the value of 'Mint' is not usable in a constant expression
    vector<Mint> fnew(m), gnew(m);
           ^
0_0_37851531_938.cpp:98:10: note: 'Mint' was not declared 'constexpr'
   vector<Mint> f(m, 1), g(m), psg(m + 1);
          ^
0_0_37851531_938.cpp:100:15: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    vector<Mint> fnew(m), gnew(m);
               ^
0_0_37851531_938.cpp:100:15: error:   expected a type, got 'Mint'
0_0_37851531_938.cpp:100:15: error: template argument 2 is invalid
0_0_37851531_938.cpp:100:21: error: invalid type in declaration before '(' token
    vector<Mint> fnew(m), gnew(m);
                     ^
0_0_37851531_938.cpp:103:11: error: invalid types 'int[int]' for array subscript
     fnew[i] = f[l] + psg[r + 1] - psg[l + 1];
           ^
0_0_37851531_938.cpp:103:18: error: invalid types 'int[int]' for array subscript
     fnew[i] = f[l] + psg[r + 1] - psg[l + 1];
                  ^
0_0_37851531_938.cpp:103:31: error: invalid types 'int[int]' for array subscript
     fnew[i] = f[l] + psg[r + 1] - psg[l + 1];
                               ^
0_0_37851531_938.cpp:103:44: error: invalid types 'int[int]' for array subscript
     fnew[i] = f[l] + psg[r + 1] - psg[l + 1];
                                            ^
0_0_37851531_938.cpp:105:12: error: invalid types 'int[int]' for array subscript
      gnew[i] = i + k < m ? g[i + k] : 0;
            ^
0_0_37851531_938.cpp:105:35: error: invalid types 'int[int]' for array subscript
      gnew[i] = i + k < m ? g[i + k] : 0;
                                   ^
0_0_37851531_938.cpp:106:18: error: invalid types 'int[int]' for array subscript
     } else gnew[i] = fnew[i];
                  ^
0_0_37851531_938.cpp:106:28: error: invalid types 'int[int]' for array subscript
     } else gnew[i] = fnew[i];
                            ^
0_0_37851531_938.cpp:110:9: error: invalid types 'int[int]' for array subscript
    psg[0] = 0;
         ^
0_0_37851531_938.cpp:111:30: error: invalid types 'int[int]' for array subscript
    rep(i, 0, m - 1) psg[i + 1] = psg[i] + g[i];
                              ^
0_0_37851531_938.cpp:111:39: error: invalid types 'int[int]' for array subscript
    rep(i, 0, m - 1) psg[i + 1] = psg[i] + g[i];
                                       ^
0_0_37851531_938.cpp:111:46: error: invalid types 'int[int]' for array subscript
    rep(i, 0, m - 1) psg[i + 1] = psg[i] + g[i];
                                              ^
0_0_37851531_938.cpp:113:23: error: invalid types 'int[int]' for array subscript
   printf("%d\n", psg[m].x);
                       ^


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 04:30:50, Gzip enabled