Borderou de evaluare (job #2883145)

Utilizator Theo20067Cismaru Theodor-Alexe Theo20067 Data 1 aprilie 2022 10:55:47
Problema Secvbest Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:7:31: error: 'int j1' redeclared as different kind of entity 7 | int i,j,k,n,s,p,minim,poz,sol,j1; | ^~ In file included from /usr/include/features.h:461, from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522, from /usr/include/c++/10/iosfwd:38, from /usr/include/c++/10/ios:38, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/fstream:38, from main.cpp:1: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:218:1: note: previous declaration 'double j1(double)' 218 | __MATHCALL (j1,, (_Mdouble_)); | ^~~~~~~~~~ main.cpp: In function 'int main()': main.cpp:22:11: error: assignment of function 'double j1(double)' 22 | j1=j%2; | ~~^~~~ main.cpp:25:14: error: invalid types 'long long int [3][100001][double(double) throw () {aka double(double)}]' for array subscript 25 | D[j1][i]=INT_MAX; | ^ main.cpp:27:23: error: invalid operands of types 'int' and 'double(double) throw ()' {aka 'double(double)'} to binary 'operator-' 27 | if(D[1-j1][p]+abs(s-(S[i]-S[p]))<D[j1][i]) | ~^~~ | | | | | double(double) throw () {aka double(double)} | int main.cpp:27:51: error: invalid types 'long long int [3][100001][double(double) throw () {aka double(double)}]' for array subscript 27 | if(D[1-j1][p]+abs(s-(S[i]-S[p]))<D[j1][i]) | ^ main.cpp:28:22: error: invalid types 'long long int [3][100001][double(double) throw () {aka double(double)}]' for array subscript 28 | D[j1][i]=D[1-j1][p]+abs(s-(S[i]-S[p])); | ^ main.cpp:28:33: error: invalid operands of types 'int' and 'double(double) throw ()' {aka 'double(double)'} to binary 'operator-' 28 | D[j1][i]=D[1-j1][p]+abs(s-(S[i]-S[p])); | ~^~~ | | | | | double(double) throw () {aka double(double)} | int main.cpp:30:16: error: invalid types 'long long int [3][100001][double(double) throw () {aka double(double)}]' for array subscript 30 | fout<<D[j1][n]<<" "; | ^ Non zero exit status: 1

Ceva nu functioneaza?