QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#84697 | #5658. Problem Setting | larryzhong | Compile Error | / | / | C++17 | 2.2kb | 2023-03-06 17:11:04 | 2023-03-06 17:11:08 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code:2:9: error: ISO C++ forbids declaration of ‘mint’ with no type [-fpermissive] 2 | mint(int _x = 0) : x(_x % P) { x < 0 ? x += P : 0; } | ^~~~ answer.code: In function ‘int mint(int)’: answer.code:2:28: error: only constructors take member initializers 2 | mint(int _x = 0) : x(_x % P) { x < 0 ? x += P : 0; } | ^ answer.code:2:35: error: ‘P’ was not declared in this scope 2 | mint(int _x = 0) : x(_x % P) { x < 0 ? x += P : 0; } | ^ answer.code:2:53: error: ‘P’ was not declared in this scope 2 | mint(int _x = 0) : x(_x % P) { x < 0 ? x += P : 0; } | ^ answer.code:2:60: warning: no return statement in function returning non-void [-Wreturn-type] 2 | mint(int _x = 0) : x(_x % P) { x < 0 ? x += P : 0; } | ^ answer.code: At global scope: answer.code:3:19: error: non-member function ‘int val()’ cannot have cv-qualifier 3 | int val() const { return x; } | ^~~~~ answer.code:5:9: error: ‘mint’ does not name a type; did you mean ‘int’? 5 | mint operator - () const { | ^~~~ | int answer.code:8:9: error: ‘mint’ does not name a type; did you mean ‘int’? 8 | mint inv() const { | ^~~~ | int answer.code:12:9: error: ‘mint’ does not name a type; did you mean ‘int’? 12 | mint &operator += (const mint &rhs) { | ^~~~ | int answer.code:16:9: error: ‘mint’ does not name a type; did you mean ‘int’? 16 | mint &operator -= (const mint &rhs) { | ^~~~ | int answer.code:20:9: error: ‘mint’ does not name a type; did you mean ‘int’? 20 | mint &operator *= (const mint &rhs) { | ^~~~ | int answer.code:24:9: error: ‘mint’ does not name a type; did you mean ‘int’? 24 | mint &operator /= (const mint &rhs) { | ^~~~ | int answer.code:27:9: error: ‘friend’ used outside of class 27 | friend mint operator + (const mint &lhs, const mint &rhs) { | ^~~~~~ | ------ answer.code:27:16: error: ‘mint’ does not name a type; did you mean ‘int’? 27 | friend mint operator + (const mint &lhs, const mint &rhs) { | ^~~~ | int answer.code:31:9: error: ‘friend’ used outside of class 31 | friend mint operator - (const mint &lhs, const mint &rhs) { | ^~~~~~ | ------ answer.code:31:16: error: ‘mint’ does not name a type; did you mean ‘int’? 31 | friend mint operator - (const mint &lhs, const mint &rhs) { | ^~~~ | int answer.code:35:9: error: ‘friend’ used outside of class 35 | friend mint operator * (const mint &lhs, const mint &rhs) { | ^~~~~~ | ------ answer.code:35:16: error: ‘mint’ does not name a type; did you mean ‘int’? 35 | friend mint operator * (const mint &lhs, const mint &rhs) { | ^~~~ | int answer.code:39:9: error: ‘friend’ used outside of class 39 | friend mint operator / (const mint &lhs, const mint &rhs) { | ^~~~~~ | ------ answer.code:39:16: error: ‘mint’ does not name a type; did you mean ‘int’? 39 | friend mint operator / (const mint &lhs, const mint &rhs) { | ^~~~ | int answer.code:44:9: error: ‘friend’ used outside of class 44 | friend ostream &operator << (ostream &os, const mint &a) { | ^~~~~~ | ------ answer.code:44:16: error: ‘ostream’ does not name a type 44 | friend ostream &operator << (ostream &os, const mint &a) { | ^~~~~~~ answer.code:47:1: error: expected declaration before ‘}’ token 47 | }; | ^ answer.code: In function ‘int main()’: answer.code:50:9: error: ‘ios’ has not been declared 50 | ios::sync_with_stdio(0), cin.tie(0); | ^~~ answer.code:50:34: error: ‘cin’ was not declared in this scope 50 | ios::sync_with_stdio(0), cin.tie(0); | ^~~ answer.code:53:9: error: ‘vector’ was not declared in this scope 53 | vector<int> mask(n); | ^~~~~~ answer.code:53:16: error: expected primary-expression before ‘int’ 53 | vector<int> mask(n); | ^~~ answer.code:55:17: error: ‘string’ was not declared in this scope 55 | string s; | ^~~~~~ answer.code:56:24: error: ‘s’ was not declared in this scope 56 | cin >> s; | ^ answer.code:59:33: error: ‘mask’ wa...