#3960
intersectie_siruri
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 | #33245143 | Utilizator | |
Fișier | intersectie_siruri.cpp | Dimensiune | 801 B |
Data încărcării | 12 Decembrie 2021, 11:35 | Scor / rezultat | Eroare de compilare |
intersectie_siruri.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout("intersectie.out") ^ intersectie_siruri.cpp: In function 'int main()': intersectie_siruri.cpp:9:5: error: 'n' was not declared in this scope n=0; ^ intersectie_siruri.cpp:10:10: error: 'x' was not declared in this scope fin>>x; ^ intersectie_siruri.cpp:13:9: error: 'a' was not declared in this scope a[++n]=x; ^ intersectie_siruri.cpp:18:9: error: 'm' was not declared in this scope m=0; ^ intersectie_siruri.cpp:21:9: error: 'b' was not declared in this scope b[++m]=x; ^ intersectie_siruri.cpp:25:7: error: 'i' was not declared in this scope i=1,j=1,k=0; ^ intersectie_siruri.cpp:25:11: error: 'j' was not declared in this scope i=1,j=1,k=0; ^ intersectie_siruri.cpp:25:15: error: 'k' was not declared in this scope i=1,j=1,k=0; ^ intersectie_siruri.cpp:26:22: error: 'm' was not declared in this scope while(i<n && j<m) ^ intersectie_siruri.cpp:28:14: error: 'a' was not declared in this scope if(a[i]<b[j])i++; ^ intersectie_siruri.cpp:28:19: error: 'b' was not declared in this scope if(a[i]<b[j])i++; ^ intersectie_siruri.cpp:33:15: error: 'c' was not declared in this scope c[++k]=a[i++];j++; ^ intersectie_siruri.cpp:37:13: error: 'a' was not declared in this scope a[i]=c[i]; ^ intersectie_siruri.cpp:37:18: error: 'c' was not declared in this scope a[i]=c[i]; ^ intersectie_siruri.cpp:40:9: error: 'fout' was not declared in this scope fout<<"nu exista" ^ intersectie_siruri.cpp:41:9: error: expected ';' before 'else' else ^ intersectie_siruri.cpp:42:25: error: expected ';' before ')' token for(i=1;i<=n;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ă.