#3960
Dându-se mai multe șiruri crescătoare de numere naturale, fiecare astfel de șir terminându-se cu numărul 0
, se cere să se afișeze în ordine strict crescătoare, numerele comune tuturor șirurilor.
ad-hoc
Problema | intersectie_siruri | Operații I/O |
![]() intersectie.in /intersectie.out
|
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #57462163 | Utilizator | |
Fișier | intersectie_siruri.cpp | Dimensiune | 852 B |
Data încărcării | 01 Aprilie 2025, 10:54 | Scor / rezultat | Eroare de compilare |
intersectie_siruri.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("intersectie.in"); ^ intersectie_siruri.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("intersectie.out"); ^ intersectie_siruri.cpp: In function 'int main()': intersectie_siruri.cpp:8:5: error: 'ok' was not declared in this scope ok=0; ^ intersectie_siruri.cpp:10:9: error: 'fin' was not declared in this scope fin>>x; ^ intersectie_siruri.cpp:10:14: error: 'x' was not declared in this scope fin>>x; ^ intersectie_siruri.cpp:12:9: error: 'a' was not declared in this scope a[i]=x; ^ intersectie_siruri.cpp:13:12: error: 'x' was not declared in this scope }while(x!=0); ^ intersectie_siruri.cpp:15:5: error: 'n' was not declared in this scope n=i; ^ intersectie_siruri.cpp:16:5: error: 'j' was not declared in this scope j=0; ^ intersectie_siruri.cpp:17:11: error: 'fin' was not declared in this scope while(fin>>x) ^ intersectie_siruri.cpp:21:13: error: 'b' was not declared in this scope b[j]=x; ^ intersectie_siruri.cpp:25:13: error: 'm' was not declared in this scope m=j; ^ intersectie_siruri.cpp:26:13: error: 'k' was not declared in this scope k=0; ^ intersectie_siruri.cpp:30:20: error: 'a' was not declared in this scope if(a[i]<b[j]) ^ intersectie_siruri.cpp:30:25: error: 'b' was not declared in this scope if(a[i]<b[j]) ^ intersectie_siruri.cpp:38:21: error: 'c' was not declared in this scope c[k]=a[i]; ^ intersectie_siruri.cpp:44:16: error: 'k' was not declared in this scope for(i=1;i<+k;i++) ^ intersectie_siruri.cpp:45:5: error: 'fout' was not declared in this scope fout<<c[i]<<" "; ^ intersectie_siruri.cpp:45:11: error: 'c' was not declared in this scope fout<<c[i]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema intersectie_siruri 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ă.