Submission #80581


ソースコード

ステータス

項目 データ
問題 1789 - 大きな素数
ユーザー名 T101010101
投稿日時 2024-08-22 19:36:12
言語 C++17
状態 Compile Error
得点 0
ソースコード長 29258 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:7:13: error: expected ‘;’ at end of member declaration
 #define int ll
             ^~
./Main.cpp:653:14: note: in expansion of macro ‘int’
     unsigned int _m;
              ^~~
./Main.cpp:653:18: error: ‘_m’ does not name a type; did you mean ‘tm’?
     unsigned int _m;
                  ^~
                  tm
./Main.cpp:657:35: error: expected ‘,’ or ‘...’ before ‘m’
     explicit barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
                                   ^
./Main.cpp:7:13: error: expected ‘;’ at end of member declaration
 #define int ll
             ^~
./Main.cpp:660:14: note: in expansion of macro ‘int’
     unsigned int umod() const { return _m; }
              ^~~
./Main.cpp:7:13: error: redeclaration of ‘unsigned int internal::barrett::ll’
 #define int ll
             ^~
./Main.cpp:660:14: note: in expansion of macro ‘int’
     unsigned int umod() const { return _m; }
              ^~~
./Main.cpp:7:13: note: previous declaration ‘unsigned int internal::barrett::ll’
 #define int ll
             ^~
./Main.cpp:653:14: note: in expansion of macro ‘int’
     unsigned int _m;
              ^~~
./Main.cpp:660:25: error: ISO C++ forbids declaration of ‘umod’ with no type [-fpermissive]
     unsigned int umod() const { return _m; }
                         ^~~~~
./Main.cpp:7:13: error: expected ‘;’ at end of member declaration
 #define int ll
             ^~
./Main.cpp:665:14: note: in expansion of macro ‘int’
     unsigned int mul(unsigned int a, unsigned int b) const {
              ^~~
./Main.cpp:7:13: error: redeclaration of ‘unsigned int internal::barrett::ll’
 #define int ll
             ^~
./Main.cpp:665:14: note: in expansion of macro ‘int’
     unsigned int mul(unsigned int a, unsigned int b) const {
              ^~~
./Main.cpp:7:13: note: previous declaration ‘unsigned int internal::barrett::ll’
 #define int ll
             ^~
./Main.cpp:653:14: note: in expansion of macro ‘int’
     unsigned int _m;
              ^~~
./Main.cpp:665:35: error: expected ‘,’ or ‘...’ before ‘a’
     unsigned int mul(unsigned int a, unsigned int b) const {
                                   ^
./Main.cpp:665:54: error: ISO C++ forbids declaration of ‘mul’ with no type [-fpermissive]
     unsigned int mul(unsigned int a, unsigned int b) const {
                                                      ^~~~~
./Main.cpp: In constructor ‘internal::barrett::barrett(unsigned int)’:
./Main.cpp:657:40: error: class ‘internal::barrett’ does not have any field named ‘_m’
     explicit barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
                                        ^~
./Main.cpp:657:43: error: ‘m’ was not declared in this scope
     explicit barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
                                           ^
./Main.cpp:657:43: note: suggested alternative: ‘im’
     explicit barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
                                           ^
                                           im
./Main.cpp: In member function ‘int internal::barrett::umod() const’:
./Main.cpp:660:40: error: ‘_m’ was not declared in this scope
     unsigned int umod() const { return _m; }
                                        ^~
./Main.cpp:660:40: note: suggested alternative: ‘im’
     unsigned int umod() const { return _m; }
                                        ^~
                                        im
./Main.cpp: In member function ‘int internal::barrett::mul(unsigned int) const’:
./Main.cpp:676:32: error: ‘a’ was not declared in this scope
         unsigned long long z = a;
                                ^
./Main.cpp:677:14: error: ‘b’ was not declared in this scope
         z *= b;
              ^
./Main.cpp:685:22: error: expected initializer before ‘v’
         unsigned int v = (unsigned int)(z - x * _m);
                      ^
./Main.cpp:686:13: error: ‘_m’ was not declared in this scope
         if (_m <= v) v += _m;
             ^~
./Main.cpp:686:13: note: suggested alternative: ‘im’
         if (_m <= v) v += _m;
             ^~
             im
./Main.cpp:686:19: error: ‘v’ was not declared in this scope
         if (_m <= v) v += _m;
                   ^
./Main.cpp:687:16: error: ‘v’ was not declared in this scope
         return v;
                ^
./Main.cpp: In function ‘constexpr long long int internal::pow_mod_constexpr(long long int, long long int, ll)’:
./Main.cpp:696:18: error: expected initializer before ‘_m’
     unsigned int _m = (unsigned int)(m);
                  ^~
./Main.cpp:700:34: error: ‘_m’ was not declared in this scope
         if (n & 1) r = (r * y) % _m;
                                  ^~
./Main.cpp:700:34: note: suggested alternative: ‘m’
         if (n & 1) r = (r * y) % _m;
                                  ^~
                                  m
./Main.cpp:701:23: error: ‘_m’ was not declared in this scope
         y = (y * y) % _m;
                       ^~
./Main.cpp:701:23: note: suggested alternative: ‘m’
         y = (y * y) % _m;
                       ^~
                       m

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #