#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 | #54575884 | Utilizator | |
Fișier | maxsim.cpp | Dimensiune | 5.81 KB |
Data încărcării | 02 Decembrie 2024, 21:01 | Scor / rezultat | Eroare de compilare |
maxsim.cpp: In function 'int main()': maxsim.cpp:22:32: error: 'INT_MAX' was not declared in this scope int n,i,k,aux,c=0,p=0,mini=INT_MAX,cif,ogl,cmmdc,r,minim=INT_MAX,maxim=-1,s=0,cp,ci,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: 'maxim' was not declared in this scope if(aux>maxim) maxim=v[i]; ^ maxsim.cpp:103:9: error: 'r' was not declared in this scope r=maxim%mini; ^ maxsim.cpp:103:11: error: 'maxim' was not declared in this scope r=maxim%mini; ^ maxsim.cpp:107:5: error: 'cmmdc' was not declared in this scope cmmdc=maxim; ^ maxsim.cpp:107:11: error: 'maxim' was not declared in this scope cmmdc=maxim; ^ 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:182:53: error: 'j' was not declared in this scope if(v[i]%100==v[i+1]%100) cout<<v[i]<<" "<<v[j]; ^ maxsim.cpp:194:16: error: 'cif' was not declared in this scope if(cif==aux%10) c++; ^ maxsim.cpp:195:13: error: 'cif' was not declared in this scope cif=aux%10; ^
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ă.