/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void HandleScore(const string&, int)':
/in/foo.cc:7:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int k = 0; k<scoreTable.size(); ++k) {
                  ~^~~~~~~~~~~~~~~~~~
/in/foo.cc:16:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if (((wcnt == dividerCount||lcnt==dividerCount)&&(abs(lcnt-wcnt)>=2))||((wcnt>dividerCount||lcnt>dividerCount)&&(abs(lcnt-wcnt)==2)) )
   ^~
/in/foo.cc:20:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    wcnt = 0, lcnt=0;
    ^~~~
/in/foo.cc:6:6: warning: unused variable 'i' [-Wunused-variable]
  int i = 0, j = 0, wcnt = 0, lcnt = 0;
      ^
/in/foo.cc:6:13: warning: unused variable 'j' [-Wunused-variable]
  int i = 0, j = 0, wcnt = 0, lcnt = 0;
             ^
/in/foo.cc: At global scope:
/in/foo.cc:23:8: error: expected constructor, destructor, or type conversion before '(' token
  printf("%d:%d\n", wcnt, lcnt);
        ^
/in/foo.cc:24:2: error: expected unqualified-id before 'return'
  return;
  ^~~~~~
/in/foo.cc:25:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P1217 乒乓球
语言
C++
递交时间
2017-12-07 15:42:00
评测时间
2017-12-07 15:42:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes