#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 | #64173066 | Utilizator | |
| Fișier | intersectie_siruri.cpp | Dimensiune | 1005 B |
| Data încărcării | 21 Aprilie 2026, 15:48 | Scor/rezultat | Eroare de compilare |
intersectie_siruri.cpp:5:15: warning: missing terminating " character 5 | ofstream fout("intersectie.out); | ^ intersectie_siruri.cpp:5:15: error: missing terminating " character 5 | ofstream fout("intersectie.out); | ^~~~~~~~~~~~~~~~~~ intersectie_siruri.cpp:6:11: error: expected ‘)’ before ‘{’ token 6 | int main() | ^ | ) 7 | {int candidat[100000],numar; | ~ intersectie_siruri.cpp:5:14: note: to match this ‘(’ 5 | ofstream fout("intersectie.out); | ^ intersectie_siruri.cpp: In function ‘std::ofstream fout(int (*)())’: intersectie_siruri.cpp:26:19: error: expected primary-expression before ‘>’ token 26 | if(v[i[>candidat[j]) | ^ intersectie_siruri.cpp:26:31: error: expected ‘]’ before ‘)’ token 26 | if(v[i[>candidat[j]) | ^ | ] intersectie_siruri.cpp:26:31: error: expected ‘]’ before ‘)’ token 26 | if(v[i[>candidat[j]) | ^ | ] intersectie_siruri.cpp:34:23: error: ‘i’ was not declared in this scope 34 | for(i=0;i<l_candidat;i++) | ^ intersectie_siruri.cpp:37:23: error: invalid operands of types ‘std::ofstream(int (*)())’ {aka ‘std::basic_ofstream<char>(int (*)())’} and ‘const char [10]’ to binary ‘operator<<’ 37 | fout<<"nu exista"; | ~~~~^~~~~~~~~~~~~ | | | | | const char [10] | std::ofstream(int (*)()) {aka std::basic_ofstream<char>(int (*)())} intersectie_siruri.cpp:38:26: error: could not convert ‘0’ from ‘int’ to ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’} 38 | return 0; | ^ | | | int intersectie_siruri.cpp:39:20: error: expected ‘}’ at end of input 39 | } | ^ intersectie_siruri.cpp:7:1: note: to match this ‘{’ 7 | {int candidat[100000],numar; | ^
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ă.