记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:34:47: error: expected ';' before 'int'
   34 |                 c.push_back(findI(b, a[i], n))
      |                                               ^
      |                                               ;
   35 | 
   36 |         int cntSwap = 0;
      |         ~~~                                    
/in/foo.cc:48:33: error: 'cntSwap' was not declared in this scope
   48 |                                 cntSwap++;
      |                                 ^~~~~~~
/in/foo.cc:53:17: error: 'cntSwap' was not declared in this scope
   53 |         cout << cntSwap << endl;
      |                 ^~~~~~~
/in/foo.cc: In function 'int findI(std::vector<int>&, int&, int&)':
/in/foo.cc:60:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   60 |         for(int i = 0; i < arr.size(); i++)
      |                        ~~^~~~~~~~~~~~

信息

递交者
类型
自测
题目
4 排序中的交换次数
语言
C++
递交时间
2025-03-13 19:20:53
评测时间
2025-03-13 19:20:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes