QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#107895#2. BoatjuruocjlCompile Error//C++203.0kb2023-05-23 07:09:042023-05-23 07:09:06

Details

answer.code:18:17: error: expected unqualified-id before ‘int’
   18 |     modint<mod>(int o=0){x=o;}
      |                 ^~~
answer.code:18:17: error: expected ‘)’ before ‘int’
   18 |     modint<mod>(int o=0){x=o;}
      |                ~^~~
      |                 )
answer.code: In function ‘int main()’:
answer.code:58:32: error: conversion from ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} to non-scalar type ‘mint’ {aka ‘modint<1000000007>’} requested
   58 |                 mint len=num[j]-num[j-1];
answer.code:61:32: error: conversion from ‘int’ to non-scalar type ‘mint’ {aka ‘modint<1000000007>’} requested
   61 |                         mint f=0;int m=1;mint c=C[m];
      |                                ^
answer.code:69:18: error: conversion from ‘int’ to non-scalar type ‘mint’ {aka ‘modint<1000000007>’} requested
   69 |         mint ans=0;
      |                  ^
answer.code: In instantiation of ‘modint<mod>& modint<mod>::operator^=(int) [with int mod = 1000000007]’:
answer.code:32:70:   required from ‘modint<mod>& modint<mod>::operator/=(int) [with int mod = 1000000007]’
answer.code:36:79:   required from ‘modint<mod> operator/(modint<mod>, I) [with I = int; int mod = 1000000007]’
answer.code:59:46:   required from here
answer.code:24:31: error: conversion from ‘int’ to non-scalar type ‘modint<1000000007>’ requested
   24 |         modint<mod> a=*this,c=1;
      |                               ^