Submission #63634


ソースコード

ステータス

項目 データ
問題 1397 - 山本式素因数分解
ユーザー名 maintenance
投稿日時 2020-09-03 21:36:17
言語 C++17
状態 Compile Error
得点 0
ソースコード長 4843 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:15:11: error: ‘size_t’ does not name a type
 constexpr size_t    operator""_zu(unsigned long long value) { return value; };
           ^~~~~~
./Main.cpp:15:11: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
./Main.cpp:1:1:
+#include <cstddef>
 // Begin Header {{{
./Main.cpp:15:11:
 constexpr size_t    operator""_zu(unsigned long long value) { return value; };
           ^~~~~~
./Main.cpp:16:11: error: ‘intmax_t’ does not name a type
 constexpr intmax_t  operator""_jd(unsigned long long value) { return value; };
           ^~~~~~~~
./Main.cpp:17:11: error: ‘uintmax_t’ does not name a type
 constexpr uintmax_t operator""_ju(unsigned long long value) { return value; };
           ^~~~~~~~~
./Main.cpp:20:11: error: ‘intmax_t’ does not name a type
 constexpr intmax_t LINF = 0x3f3f3f3f3f3f3f3f_jd;
           ^~~~~~~~
./Main.cpp:22:36: error: ‘less’ does not name a type; did you mean ‘class’?
 template <class T, class Compare = less<>>
                                    ^~~~
                                    class
./Main.cpp:22:40: error: expected ‘>’ before ‘<’ token
 template <class T, class Compare = less<>>
                                        ^
./Main.cpp:23:17: error: ‘priority_queue’ does not name a type
 using MaxHeap = priority_queue<T, vector<T>, Compare>;
                 ^~~~~~~~~~~~~~
./Main.cpp:24:36: error: ‘greater’ does not name a type
 template <class T, class Compare = greater<>>
                                    ^~~~~~~
./Main.cpp:24:43: error: expected ‘>’ before ‘<’ token
 template <class T, class Compare = greater<>>
                                           ^
./Main.cpp:25:17: error: ‘priority_queue’ does not name a type
 using MinHeap = priority_queue<T, vector<T>, Compare>;
                 ^~~~~~~~~~~~~~
./Main.cpp: In function ‘void input(Head&&, Tail&& ...)’:
./Main.cpp:30:5: error: ‘cin’ was not declared in this scope
     cin >> head;
     ^~~
./Main.cpp:30:5: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp:1:1:
+#include <iostream>
 // Begin Header {{{
./Main.cpp:30:5:
     cin >> head;
     ^~~
./Main.cpp:31:11: error: ‘forward’ was not declared in this scope
     input(forward<Tail>(tail)...);
           ^~~~~~~
./Main.cpp:31:11: note: ‘std::forward’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
./Main.cpp:1:1:
+#include <utility>
 // Begin Header {{{
./Main.cpp:31:11:
     input(forward<Tail>(tail)...);
           ^~~~~~~
./Main.cpp:31:23: error: expected primary-expression before ‘>’ token
     input(forward<Tail>(tail)...);
                       ^
./Main.cpp: At global scope:
./Main.cpp:35:10: error: ‘enable_if_t’ has not been declared
          enable_if_t<!is_same<Container, string>::value, nullptr_t> = nullptr>
          ^~~~~~~~~~~
./Main.cpp:35:21: error: expected ‘>’ before ‘<’ token
          enable_if_t<!is_same<Container, string>::value, nullptr_t> = nullptr>
                     ^
./Main.cpp:36:8: error: ‘istream’ does not name a type
 inline istream& operator>>(istream &is, Container &vs) {
        ^~~~~~~
./Main.cpp: In function ‘void output()’:
./Main.cpp:41:24: error: ‘cout’ was not declared in this scope
 inline void output() { cout << "\n"; }
                        ^~~~
./Main.cpp:41:24: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp: In function ‘void output(Head&&, Tail&& ...)’:
./Main.cpp:44:5: error: ‘cout’ was not declared in this scope
     cout << head;
     ^~~~
./Main.cpp:44:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp:46:12: error: ‘forward’ was not declared in this scope
     output(forward<Tail>(tail)...);
            ^~~~~~~
./Main.cpp:46:12: note: ‘std::forward’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
./Main.cpp:46:24: error: expected primary-expression before ‘>’ token
     output(forward<Tail>(tail)...);
                        ^
./Main.cpp: At global scope:
./Main.cpp:50:10: error: ‘enable_if_t’ has not been declared
          enable_if_t<!is_same<Container, string>::value, nullptr_t> = nullptr>
          ^~~~~~~~~~~
./Main.cpp:50:21: error: expected ‘>’ before ‘<’ token
          enable_if_t<!is_same<Container, string>::value, nullptr_t> = nullptr>
                     ^
./Main.cpp:51:8: error: ‘ostream’ does not name a type
 inline ostream& operator<<(ostream &os, const Container &vs) {
        ^~~~~~~
./Main.cpp:60:68: error: ‘string’ does not name a type; did you mean ‘struct’?
 inline void join(const Iterator &Begin, const Iterator &End, const string &delim = " ", const string &last = "\n") {
                                                                    ^~~~~~
                                                                    struct
./Main.cpp:60:95: error: ‘string’ does not name a type; did you mean ‘struct’?
 inline void join(const Iterator &Begin, const Iterator &End, const string &delim = " ", const string &last = "\n") {
                                                                                               ^~~~~~
                                                                                               struct
./Main.cpp: In function ‘void join(const Iterator&, const Iterator&, const int&, const int&)’:
./Main.cpp:62:9: error: ‘cout’ was not declared in this scope
         cout << ((it == Begin) ? "" : delim) << *it;
         ^~~~
./Main.cpp:62:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp:64:5: error: ‘cout’ was not declared in this scope
     cout << last;
     ^~~~
./Main.cpp:64:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp: At global scope:
./Main.cpp:68:8: error: ‘vector’ does not name a type
 inline vector<T> makeVector(const T &initValue, size_t sz) {
        ^~~~~~
./Main.cpp:73:44: error: ‘size_t’ has not been declared
 inline auto makeVector(const T &initValue, size_t sz, Args... args) {
                                            ^~~~~~
./Main.cpp: In function ‘auto makeVector(const T&, int, Args ...)’:
./Main.cpp:74:12: error: ‘vector’ was not declared in this scope
     return vector<decltype(makeVector<T>(initValue, args...))>(sz, makeVector<T>(initValue, args...));
            ^~~~~~
./Main.cpp:74:12: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
./Main.cpp:1:1:
+#include <vector>
 // Begin Header {{{
./Main.cpp:74:12:
     return vector<decltype(makeVector<T>(initValue, args...))>(sz, makeVector<T>(initValue, args...));
            ^~~~~~
./Main.cpp:74:19: error: expected primary-expression before ‘decltype’
     return vector<decltype(makeVector<T>(initValue, args...))>(sz, makeVector<T>(initValue, args...));
                   ^~~~~~~~
./Main.cpp:74:19: error: expected ‘;’ before ‘decltype’
     return vector<decltype(makeVector<T>(initValue, args...))>(sz, makeVector<T>(initValue, args...));
                   ^~~~~~~~
                   ;
./Main.cpp:74:62: error: expected unqualified-id before ‘>’ token
     return vector<decltype(makeVector<T>(initValue, args...))>(sz, makeVector<T>(initValue, args...));
                                                              ^
./Main.cpp: In constructor ‘constexpr FixPoint<Func>::FixPoint(Func&&)’:
./Main.cpp:80:59: error: ‘forward’ was not declared in this scope
     explicit constexpr FixPoint(Func&& f) noexcept : Func(forward<Func>(f)) {}
                                                           ^~~~~~~
./Main.cpp:80:59: note: ‘std::forward’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
./Main.cpp:80:71: error: expected primary-expression before ‘>’ token
     explicit constexpr FixPoint(Func&& f) noexcept : Func(forward<Func>(f)) {}
                                                                       ^
./Main.cpp: In member function ‘constexpr decltype(auto) FixPoint<Func>::operator()(Args&& ...) const’:
./Main.cpp:84:45: error: ‘forward’ is not a member of ‘std’
         return Func::operator()(*this, std::forward<Args>(args)...);
                                             ^~~~~~~
./Main.cpp:84:45: note: ‘std::forward’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
./Main.cpp:84:57: error: expected primary-expression before ‘>’ token
         return Func::operator()(*this, std::forward<Args>(args)...);
                                                         ^
./Main.cpp: In function ‘constexpr decltype(auto) makeFixPoint(Func&&)’:
./Main.cpp:90:27: error: ‘forward’ was not declared in this scope
     return FixPoint<Func>{forward<Func>(f)};
                           ^~~~~~~
./Main.cpp:90:27: note: ‘std::forward’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
./Main.cpp:90:26: error: expected primary-expression before ‘{’ token
     return FixPoint<Func>{forward<Func>(f)};
                          ^
./Main.cpp:90:26: error: expected ‘;’ before ‘{’ token
     return FixPoint<Func>{forward<Func>(f)};
                          ^
                          ;
./Main.cpp:90:39: error: expected primary-expression before ‘>’ token
     return FixPoint<Func>{forward<Func>(f)};
                                       ^
./Main.cpp:90:43: error: expected ‘;’ before ‘}’ token
     return FixPoint<Func>{forward<Func>(f)};
                                           ^
                                           ;
./Main.cpp: In function ‘void ioinit()’:
./Main.cpp:122:5: error: ‘ios_base’ has not been declared
     ios_base::sync_with_stdio(false);
     ^~~~~~~~
./Main.cpp:123:5: error: ‘cin’ was not declared in this scope
     cin.tie(nullptr);
     ^~~
./Main.cpp:123:5: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp:124:5: error: ‘cout’ was not declared in this scope
     cout << fixed << setprecision(10);
     ^~~~
./Main.cpp:124:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp:124:13: error: ‘fixed’ was not declared in this scope
     cout << fixed << setprecision(10);
             ^~~~~
./Main.cpp:124:13: note: suggested alternative: ‘signed’
     cout << fixed << setprecision(10);
             ^~~~~
             signed
./Main.cpp:124:22: error: ‘setprecision’ was not declared in this scope
     cout << fixed << setprecision(10);
                      ^~~~~~~~~~~~
./Main.cpp:125:5: error: ‘clog’ was not declared in this scope
     clog << fixed << setprecision(10);
     ^~~~
./Main.cpp:125:5: note: ‘std::clog’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./Main.cpp: In function ‘int main()’:
./Main.cpp:132:9: error: ‘intmax_t’ was not declared in this scope
     var(intmax_t, N);
         ^~~~~~~~
./Main.cpp:13:24: note: in definition of macro ‘var’
 #define var(Type, ...) Type __VA_ARGS__; input(__VA_ARGS__)
                        ^~~~
./Main.cpp:132:19: error: ‘N’ was not declared in this scope
     var(intmax_t, N);
                   ^
./Main.cpp:13:48: note: in definition of macro ‘var’
 #define var(Type, ...) Type __VA_ARGS__; input(__VA_ARGS__)
                                                ^~~~~~~~~~~
./Main.cpp:133:5: error: ‘assert’ was not declared in this scope
     assert(2 <= N && N <= intmax_t(1e6));
     ^~~~~~
./Main.cpp:133:5: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
./Main.cpp:1:1:
+#include <cassert>
 // Begin Header {{{
./Main.cpp:133:5:
     assert(2 <= N && N <= intmax_t(1e6));
     ^~~~~~
./Main.cpp:135:5: error: ‘vector’ was not declared in this scope
     vector<intmax_t> min_prime(N + 1);
     ^~~~~~
./Main.cpp:135:5: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
./Main.cpp:135:22: error: ‘min_prime’ was not declared in this scope
     vector<intmax_t> min_prime(N + 1);
                      ^~~~~~~~~
./Main.cpp:8:16: error: ‘begin’ was not declared in this scope
 #define all(x) begin(x), end(x)
                ^~~~~
./Main.cpp:136:10: note: in expansion of macro ‘all’
     iota(all(min_prime), 0);
          ^~~
./Main.cpp:8:16: note: ‘std::begin’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?
./Main.cpp:1:1:
+#include <iterator>
 // Begin Header {{{
./Main.cpp:8:16:
 #define all(x) begin(x), end(x)
                ^~~~~
./Main.cpp:136:10: note: in expansion of macro ‘all’
     iota(all(min_prime), 0);
          ^~~
./Main.cpp:8:26: error: ‘end’ was not declared in this scope
 #define all(x) begin(x), end(x)
                          ^~~
./Main.cpp:136:10: note: in expansion of macro ‘all’
     iota(all(min_prime), 0);
          ^~~
./Main.cpp:8:26: note: ‘std::end’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?
 #define all(x) begin(x), end(x)
                          ^~~
./Main.cpp:136:10: note: in expansion of macro ‘all’
     iota(all(min_prime), 0);
          ^~~
./Main.cpp:136:5: error: ‘iota’ was not declared in this scope
     iota(all(min_prime), 0);
     ^~~~
./Main.cpp:136:5: note: suggested alternative: ‘int’
     iota(all(min_prime), 0);
     ^~~~
     int
./Main.cpp:137:18: error: expected ‘;’ before ‘i’
     for (intmax_t i = 2; i * i <= N; ++i) {
                  ^~
                  ;
./Main.cpp:137:26: error: ‘i’ was not declared in this scope
     for (intmax_t i = 2; i * i <= N; ++i) {
                          ^
./Main.cpp:139:22: error: expected ‘;’ before ‘j’
         for (intmax_t j = i * i; j <= N; j += i) {
                      ^~
                      ;
./Main.cpp:139:34: error: ‘j’ was not declared in this scope
         for (intmax_t j = i * i; j <= N; j += i) {
                                  ^
./Main.cpp:144:37: error: ‘intmax_t’ is not a type
     const auto primeFactorize = [&](intmax_t n) {
                                     ^~~~~~~~
./Main.cpp: In lambda function:
./Main.cpp:145:9: error: ‘unordered_map’ was not declared in this scope
         unordered_map<intmax_t, intmax_t> cnt;
         ^~~~~~~~~~~~~
./Main.cpp:145:9: note: ‘std::unordered_map’ is defined in header ‘<unordered_map>’; did you forget to ‘#include <unordered_map>’?
./Main.cpp:1:1:
+#include <unordered_map>
 // Begin Header {{{
./Main.cpp:145:9:
         unordered_map<intmax_t, intmax_t> cnt;
         ^~~~~~~~~~~~~
./Main.cpp:145:43: error: ‘cnt’ was not declared in this scope
         unordered_map<intmax_t, intmax_t> cnt;
                                           ^~~
./Main.cpp:145:43: note: suggested alternative: ‘int’
         unordered_map<intmax_t, intmax_t> cnt;
                                           ^~~
                                           int
./Main.cpp:150:16: error: unable to deduce lambda return type from ‘cnt’
         return cnt;
                ^~~
./Main.cpp: In function ‘int main()’:
./Main.cpp:153:22: error: ‘cnt’ was not declared in this scope
     vector<intmax_t> cnt(N + 1);
                      ^~~
./Main.cpp:153:22: note: suggested alternative: ‘int’
     vector<intmax_t> cnt(N + 1);
                      ^~~
                      int
./Main.cpp:154:10: error: expected ‘;’ before ‘i’
     repc(i, 2, N) {
          ^
./Main.cpp:11:37: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                     ^
./Main.cpp:154:10: error: ‘i’ was not declared in this scope
     repc(i, 2, N) {
          ^
./Main.cpp:11:63: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                                               ^
./Main.cpp:154:10: error: ‘i_limit’ was not declared in this scope
     repc(i, 2, N) {
          ^
./Main.cpp:11:68: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                                                    ^
./Main.cpp:154:10: note: suggested alternative: ‘ioinit’
     repc(i, 2, N) {
          ^
./Main.cpp:11:68: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                                                    ^
./Main.cpp:156:33: error: unable to deduce ‘auto&&’ from ‘ps’
         for (const auto [p, c]: ps) cnt[p] += c;
                                 ^~
./Main.cpp:159:10: error: expected ‘;’ before ‘p’
     repc(p, 2, N) {
          ^
./Main.cpp:11:37: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                     ^
./Main.cpp:159:10: error: ‘p’ was not declared in this scope
     repc(p, 2, N) {
          ^
./Main.cpp:11:63: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                                               ^
./Main.cpp:159:10: error: ‘p_limit’ was not declared in this scope
     repc(p, 2, N) {
          ^
./Main.cpp:11:68: note: in definition of macro ‘repc’
 #define repc(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
                                                                    ^

セット

セット 得点 Cases

テストケース

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