QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#722447 | #249. Miller Rabin 算法 | ZhaoZiLong | Compile Error | / | / | C++20 | 928b | 2024-11-07 19:04:48 | 2024-11-07 19:04:48 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:3:19: error: two or more data types in declaration of ‘a’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:4:15: note: in expansion of macro ‘long’ 4 | long long ksm(long long a,long long b,long long mod) | ^~~~ answer.code:4:26: error: expected ‘)’ before ‘,’ token 4 | long long ksm(long long a,long long b,long long mod) | ~ ^ | ) answer.code:3:19: error: two or more data types in declaration of ‘ksm’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:4:1: note: in expansion of macro ‘long’ 4 | long long ksm(long long a,long long b,long long mod) | ^~~~ answer.code:3:14: error: expected unqualified-id before ‘long’ 3 | #define long long __int128 | ^~~~ answer.code:4:27: note: in expansion of macro ‘long’ 4 | long long ksm(long long a,long long b,long long mod) | ^~~~ answer.code:3:19: error: two or more data types in declaration of ‘a’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:14:1: note: in expansion of macro ‘long’ 14 | long long a[]={2,3,5,7,11,13,17,19,23,29,31,37}; | ^~~~ answer.code:3:19: error: two or more data types in declaration of ‘x’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:15:12: note: in expansion of macro ‘long’ 15 | bool check(long long x) | ^~~~ answer.code: In function ‘bool check(...)’: answer.code:17:8: error: ‘x’ was not declared in this scope 17 | if(x==1)return false; | ^ answer.code:18:8: error: ‘x’ was not declared in this scope 18 | if(x==2)return true; | ^ answer.code:19:8: error: ‘x’ was not declared in this scope 19 | if(x%2==0)return false; | ^ answer.code:3:19: error: two or more data types in declaration of ‘t’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:20:5: note: in expansion of macro ‘long’ 20 | long long t=x-1;int k=0; | ^~~~ answer.code:20:17: error: ‘x’ was not declared in this scope 20 | long long t=x-1;int k=0; | ^ answer.code:21:11: error: ‘t’ was not declared in this scope 21 | while(t&1)t>>=1,k++; | ^ answer.code:24:12: error: ‘a’ was not declared in this scope 24 | if(a[i]>=x)return true; | ^ answer.code:3:19: error: two or more data types in declaration of ‘tmp’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:25:9: note: in expansion of macro ‘long’ 25 | long long tmp=ksm(a[i],t,x); | ^~~~ answer.code:25:27: error: ‘a’ was not declared in this scope 25 | long long tmp=ksm(a[i],t,x); | ^ answer.code:25:32: error: ‘t’ was not declared in this scope 25 | long long tmp=ksm(a[i],t,x); | ^ answer.code:25:23: error: ‘ksm’ was not declared in this scope 25 | long long tmp=ksm(a[i],t,x); | ^~~ answer.code:29:16: error: ‘tmp’ was not declared in this scope; did you mean ‘tm’? 29 | if(tmp==1||tmp==x-1){f=true;break;} | ^~~ | tm answer.code:30:13: error: ‘tmp’ was not declared in this scope; did you mean ‘tm’? 30 | tmp=tmp*tmp%x; | ^~~ | tm answer.code:32:12: error: ‘tmp’ was not declared in this scope; did you mean ‘tm’? 32 | if(tmp==1)f=true; | ^~~ | tm answer.code: In function ‘int main()’: answer.code:3:19: error: two or more data types in declaration of ‘x’ 3 | #define long long __int128 | ^~~~~~~~ answer.code:39:5: note: in expansion of macro ‘long’ 39 | long long x; | ^~~~ answer.code:40:16: error: ‘x’ was not declared in this scope 40 | while(cin>>x) | ^