记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:13: error: the value of 'n' is not usable in a constant expression
  map<string,n> m;
             ^
/in/foo.cc:6:25: note: 'll n' is not const
  ll mod=998244353,ans=1,n,i,j,k;
                         ^
/in/foo.cc:7:14: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  map<string,n> m;
              ^
/in/foo.cc:7:14: note:   expected a type, got 'n'
/in/foo.cc:7:14: error: template argument 4 is invalid
/in/foo.cc:13:4: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}')
   m[s]=k;
    ^
/in/foo.cc:16:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(i=0;i<s.size();i++)
          ~^~~~~~~~~
/in/foo.cc:18:17: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type {aka char}]' for array subscript
   ans=ans*m[s[i]]%mod;
                 ^
/in/foo.cc:6:29: warning: unused variable 'j' [-Wunused-variable]
  ll mod=998244353,ans=1,n,i,j,k;
                             ^

信息

递交者
类型
自测
题目
P1311 G. Rotating-Calipers
语言
C++
递交时间
2021-12-23 20:30:48
评测时间
2021-12-23 20:30:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes