#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 | #54465723 | Utilizator | |
Fișier | maxsim.cpp | Dimensiune | 5.13 KB |
Data încărcării | 29 Noiembrie 2024, 09:50 | 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=0,u=0,j,auxx; ^ 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; ^ maxsim.cpp:135:23: error: 'u' was not declared in this scope if(v[k]%k==0) u=i; ^ maxsim.cpp:137:16: error: 'u' was not declared in this scope if(p!=0 && u!=0) cout<<p<<" "<<u<<endl; ^ maxsim.cpp:143:13: error: 'j' was not declared in this scope for(j=1;j<=n;++j){ ^ maxsim.cpp:148:17: error: 'auxx' was not declared in this scope auxx=v[j]; ^ maxsim.cpp:164:21: error: 'auxx' was not declared in this scope auxx=v[i]; ^ maxsim.cpp:174:93: error: expected primary-expression before '<<' token if(ok2==true) cout<<"pereche care contine cif egale este "<<v[i]<<" "<<v[j];<<endl; ^ maxsim.cpp:182:13: error: 'j' was not declared in this scope for(j=1;j<=n;++j){ ^
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ă.