#1
Să se scrie un program care citeşte din fişier două numere întregi şi determină suma lor.
Problema | sum | Operații I/O |
![]() sum.in /sum.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #56824778 | Utilizator | |
Fișier | sum.cpp | Dimensiune | 925 B |
Data încărcării | 06 Martie 2025, 22:10 | Scor / rezultat | 0 puncte |
sum.cpp: In function 'void _read()': sum.cpp:39:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned i=1;i<=m;++i) ^ sum.cpp:42:40: warning: narrowing conversion of 'i' from 'unsigned int' to 'int' inside { } [-Wnarrowing] V[start].push_back({finish,i,0}); ^ sum.cpp:43:40: warning: narrowing conversion of 'i' from 'unsigned int' to 'int' inside { } [-Wnarrowing] V[finish].push_back({start,i,1}); ^ sum.cpp: In function 'int main()': sum.cpp:55:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(unsigned i=1;i<=cn;++i) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sum 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ă.