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_36420158_24335.cpp: In instantiation of 'constexpr LazyMontgomeryModInt<mod>::mint& LazyMontgomeryModInt<mod>::operator+=(const mint&) const [with unsigned int mod = 998244353u; LazyMontgomeryModInt<mod>::mint = LazyMontgomeryModInt<998244353u>]':
0_0_36420158_24335.cpp:138:29:   required from here
0_0_36420158_24335.cpp:48:19: error: assignment of member 'LazyMontgomeryModInt<998244353u>::a' in read-only object
         if (i32(a += b.a - 2 * mod) < 0) a += 2 * mod;
                   ^
0_0_36420158_24335.cpp:48:44: error: assignment of member 'LazyMontgomeryModInt<998244353u>::a' in read-only object
         if (i32(a += b.a - 2 * mod) < 0) a += 2 * mod;
                                            ^
0_0_36420158_24335.cpp:49:17: error: invalid initialization of reference of type 'LazyMontgomeryModInt<998244353u>::mint& {aka LazyMontgomeryModInt<998244353u>&}' from expression of type 'const LazyMontgomeryModInt<998244353u>'
         return *this;
                 ^
0_0_36420158_24335.cpp: In instantiation of 'constexpr LazyMontgomeryModInt<mod>::mint& LazyMontgomeryModInt<mod>::operator*=(const mint&) const [with unsigned int mod = 998244353u; LazyMontgomeryModInt<mod>::mint = LazyMontgomeryModInt<998244353u>]':
0_0_36420158_24335.cpp:72:72:   required from 'constexpr LazyMontgomeryModInt<mod>::mint LazyMontgomeryModInt<mod>::operator*(const mint&) const [with unsigned int mod = 998244353u; LazyMontgomeryModInt<mod>::mint = LazyMontgomeryModInt<998244353u>]'
0_0_36420158_24335.cpp:138:44:   required from here
0_0_36420158_24335.cpp:60:32: error: passing 'const LazyMontgomeryModInt<998244353u>' as 'this' argument of 'LazyMontgomeryModInt<mod>::u32 LazyMontgomeryModInt<mod>::reduce(const u64&) [with unsigned int mod = 998244353u; LazyMontgomeryModInt<mod>::u32 = unsigned int; LazyMontgomeryModInt<mod>::u64 = long long unsigned int]' discards qualifiers [-fpermissive]
         a = reduce(u64(a) * b.a);
                                ^
0_0_36420158_24335.cpp:60:11: error: assignment of member 'LazyMontgomeryModInt<998244353u>::a' in read-only object
         a = reduce(u64(a) * b.a);
           ^
0_0_36420158_24335.cpp:61:17: error: invalid initialization of reference of type 'LazyMontgomeryModInt<998244353u>::mint& {aka LazyMontgomeryModInt<998244353u>&}' from expression of type 'const LazyMontgomeryModInt<998244353u>'
         return *this;
                 ^


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-29 05:10:13, Gzip enabled