/ Vijos /

记录详情

Compile Error

foo.cc: In function 'std::__cxx11::string chengfa(std::__cxx11::string, std::__cxx11::string)':
foo.cc:8:2: error: 'vector' was not declared in this scope
  vector<int> tmp(m+n-1);
  ^~~~~~
foo.cc:8:2: note: suggested alternative: 'qecvt_r'
  vector<int> tmp(m+n-1);
  ^~~~~~
  qecvt_r
foo.cc:8:9: error: expected primary-expression before 'int'
  vector<int> tmp(m+n-1);
         ^~~
foo.cc:13:4: error: 'tmp' was not declared in this scope
    tmp[i+j]+=(a[i]-'0')*(b[i]-'0');
    ^~~
foo.cc:13:4: note: suggested alternative: 'tm'
    tmp[i+j]+=(a[i]-'0')*(b[i]-'0');
    ^~~
    tm
foo.cc:16:12: error: 'tmp' was not declared in this scope
  for(int i=tmp.size()-1;i>0;i--)
            ^~~
foo.cc:16:12: note: suggested alternative: 'tm'
  for(int i=tmp.size()-1;i>0;i--)
            ^~~
            tm
foo.cc:21:8: error: 'tmp' was not declared in this scope
  while(tmp[0]>9)
        ^~~
foo.cc:21:8: note: suggested alternative: 'tm'
  while(tmp[0]>9)
        ^~~
        tm
foo.cc:27:18: error: 'tmp' was not declared in this scope
  for(int i=0,len=tmp.size();i<len;i++) ans+=tmp[i]+'0';
                  ^~~
foo.cc:27:18: note: suggested alternative: 'tm'
  for(int i=0,len=tmp.size();i<len;i++) ans+=tmp[i]+'0';
                  ^~~
                  tm
foo.cc: In function 'std::__cxx11::string pow2(std::__cxx11::string, int)':
foo.cc:36:51: error: expected ')' before ';' token
  return chengfa(pow2(a, n / 2), pow2(a, n - n / 2);
                                                   ^
foo.cc: In function 'int main()':
foo.cc:192:44: error: could not convert '2' from 'int' to 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}'
  cout << getRs(strSub(chengfa(pow2(2, n - 1), "4") , "2"));
                                            ^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1354 Hanoi双塔问题
语言
C++
递交时间
2021-05-17 00:05:47
评测时间
2021-05-17 00:05:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes