QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#65659 | #4585. Greedy Knapsack | GuanYunchang | Compile Error | / | / | C | 1.9kb | 2022-12-02 19:52:14 | 2022-12-02 19:52:17 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘GreedyKnapsack’: answer.code:22:8: error: expected expression before ‘float’ 22 | cu=float(m); | ^~~~~ answer.code: At top level: answer.code:35:1: error: unknown type name ‘bool’ 35 | bool compare1(int i,int j){ | ^~~~ answer.code: In function ‘compare1’: answer.code:37:16: error: ‘true’ undeclared (first use in this function) 37 | return true; | ^~~~ answer.code:37:16: note: each undeclared identifier is reported only once for each function it appears in answer.code:38:17: error: ‘false’ undeclared (first use in this function); did you mean ‘fclose’? 38 | else return false; | ^~~~~ | fclose answer.code: At top level: answer.code:41:1: error: unknown type name ‘bool’ 41 | bool compare2(int i,int j){ | ^~~~ answer.code: In function ‘compare2’: answer.code:43:16: error: ‘true’ undeclared (first use in this function) 43 | return true; | ^~~~ answer.code:44:17: error: ‘false’ undeclared (first use in this function); did you mean ‘fclose’? 44 | else return false; | ^~~~~ | fclose answer.code: At top level: answer.code:48:1: error: unknown type name ‘bool’ 48 | bool compare3(int i,int j){ | ^~~~ answer.code: In function ‘compare3’: answer.code:50:16: error: ‘true’ undeclared (first use in this function) 50 | return true; | ^~~~ answer.code:51:17: error: ‘false’ undeclared (first use in this function); did you mean ‘fclose’? 51 | else return false; | ^~~~~ | fclose answer.code: At top level: answer.code:53:15: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token 53 | void swap(int &a,int &b){ | ^ answer.code: In function ‘sort’: answer.code:79:17: warning: implicit declaration of function ‘swap’ [-Wimplicit-function-declaration] 79 | swap(p[i],p[k]); | ^~~~