QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#767481#9254. Random VariablesHuluoboCompile Error//C++144.0kb2024-11-20 21:04:472024-11-20 21:04:49

Details

answer.code:101:5: error: redefinition of ‘int mod’
  101 | int mod;
      |     ^~~
answer.code:23:5: note: ‘int mod’ previously declared here
   23 | int mod;
      |     ^~~
answer.code:103:8: error: redefinition of ‘int pls(int, int)’
  103 | IL int pls(int x,int y){return (x+y>=mod?x+y-mod:x+y);}
      |        ^~~
answer.code:25:8: note: ‘int pls(int, int)’ previously defined here
   25 | IL int pls(int x,int y){return (x+y>=mod?x+y-mod:x+y);}
      |        ^~~
answer.code:104:8: error: redefinition of ‘int sub(int, int)’
  104 | IL int sub(int x,int y){return (x-y<0?x-y+mod:x-y);}
      |        ^~~
answer.code:26:8: note: ‘int sub(int, int)’ previously defined here
   26 | IL int sub(int x,int y){return (x-y<0?x-y+mod:x-y);}
      |        ^~~
answer.code:105:9: error: redefinition of ‘void Add(int&, int)’
  105 | IL void Add(int &x,int y){x=pls(x,y);}
      |         ^~~
answer.code:27:9: note: ‘void Add(int&, int)’ previously defined here
   27 | IL void Add(int &x,int y){x=pls(x,y);}
      |         ^~~
answer.code:106:9: error: redefinition of ‘void Dec(int&, int)’
  106 | IL void Dec(int &x,int y){x=sub(x,y);}
      |         ^~~
answer.code:28:9: note: ‘void Dec(int&, int)’ previously defined here
   28 | IL void Dec(int &x,int y){x=sub(x,y);}
      |         ^~~
answer.code:107:8: error: redefinition of ‘int mul(int, int)’
  107 | IL int mul(int x,int y){return x*1ll*y%mod;}
      |        ^~~
answer.code:29:8: note: ‘int mul(int, int)’ previously defined here
   29 | IL int mul(int x,int y){return x*1ll*y%mod;}
      |        ^~~
answer.code:108:8: error: redefinition of ‘int qp(int, int)’
  108 | IL int qp(int x,int y=mod-2){int ans=1;while(y){if(y&1)ans=mul(ans,x);x=mul(x,x);y>>=1;}return ans;}
      |        ^~
answer.code:30:8: note: ‘int qp(int, int)’ previously defined here
   30 | IL int qp(int x,int y=mod-2){int ans=1;while(y){if(y&1)ans=mul(ans,x);x=mul(x,x);y>>=1;}return ans;}
      |        ^~
answer.code:110:5: error: redefinition of ‘int read()’
  110 | int read(){
      |     ^~~~
answer.code:32:5: note: ‘int read()’ previously defined here
   32 | int read(){
      |     ^~~~
answer.code:116:6: error: redefinition of ‘void write(int)’
  116 | void write(int x){
      |      ^~~~~
answer.code:38:6: note: ‘void write(int)’ previously defined here
   38 | void write(int x){
      |      ^~~~~
answer.code:122:5: error: redefinition of ‘int f [1005][1005]’
  122 | int f[N][N],C[N][N];
      |     ^
answer.code:44:5: note: ‘int f [1005][1005]’ previously declared here
   44 | int f[N][N],C[N][N];
      |     ^
answer.code:122:13: error: redefinition of ‘int C [1005][1005]’
  122 | int f[N][N],C[N][N];
      |             ^
answer.code:44:13: note: ‘int C [1005][1005]’ previously declared here
   44 | int f[N][N],C[N][N];
      |             ^
answer.code:124:6: error: redefinition of ‘void solve()’
  124 | void solve(){
      |      ^~~~~
answer.code:46:6: note: ‘void solve()’ previously defined here
   46 | void solve(){
      |      ^~~~~
answer.code:143:5: error: redefinition of ‘int main()’
  143 | int main(){
      |     ^~~~
answer.code:65:5: note: ‘int main()’ previously defined here
   65 | int main(){
      |     ^~~~