/ Vijos /

记录详情

Compile Error

/in/foo.cc:8:13: error: 'int index [21]' redeclared as different kind of symbol
 int index[21],orders[401];
             ^
In file included from /usr/include/c++/6/cstring:42:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:48,
                 from /in/foo.cc:1:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
 index (const char *__s, int __c) __THROW
 ^~~~~
/in/foo.cc: In function 'bool check(int, int, int)':
/in/foo.cc:13:10: warning: unused variable 'flag' [-Wunused-variable]
     bool flag=1;
          ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:33:35: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
         int id = ++index[orders[i]];
                                   ^

信息

递交者
类型
递交
题目
P1314 作业调度方案
语言
C++
递交时间
2021-01-29 11:02:39
评测时间
2021-01-29 11:02:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes