#165
maxsim
Să se determine perechea de elemente dintr-un vector egal depărtate de centru cu suma elementelor maximă.
Problema | maxsim | Operații I/O |
maxsim.in /maxsim.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54440385 | Utilizator | |
Fișier | maxsim.cpp | Dimensiune | 3.74 KB |
Data încărcării | 28 Noiembrie 2024, 13:57 | Scor / rezultat | Eroare de compilare |
maxsim.cpp: In function 'int main()': maxsim.cpp:22:30: error: 'INT_MAX' was not declared in this scope int n,i,k,aux,c=0,p,mini=INT_MAX,cif,ogl,cmmdc,r,minim=INT_MAX,maxim=-1,s=0,cp,ci,p,u; ^ maxsim.cpp:46:17: error: 'axu' was not declared in this scope aux=axu/10; ^ maxsim.cpp:68:13: error: 'cif' was not declared in this scope cif=aux%10; ^ maxsim.cpp:84:9: error: 'ogl' was not declared in this scope ogl=0; ^ maxsim.cpp:86:13: error: 'cif' was not declared in this scope cif=aux%10; ^ maxsim.cpp:99:16: error: 'maxi' was not declared in this scope if(aux>maxi) maxi=v[i]; ^ maxsim.cpp:103:9: error: 'r' was not declared in this scope r=maxi%mini; ^ maxsim.cpp:103:11: error: 'maxi' was not declared in this scope r=maxi%mini; ^ maxsim.cpp:107:5: error: 'cmmdc' was not declared in this scope cmmdc=maxi; ^ maxsim.cpp:107:11: error: 'maxi' was not declared in this scope cmmdc=maxi; ^ maxsim.cpp:114:9: error: 'cp' was not declared in this scope cp=0; ^ maxsim.cpp:115:9: error: 'ci' was not declared in this scope ci=0; ^ maxsim.cpp:124:20: error: 's' was not declared in this scope if(cp==ci) s+=v[i]; ^ maxsim.cpp:126:8: error: 's' was not declared in this scope if(s!=0) cout<<s<<endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maxsim face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.