#658
SumaLinii
Se dă o matrice cu n
linii și m
coloane și elemente numere naturale. Să se determine suma elementelor de pe fiecare linie.
Problema | SumaLinii | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43979676 | Utilizator | |
Fișier | sumalinii.cpp | Dimensiune | 1.25 KB |
Data încărcării | 03 Iunie 2023, 22:48 | Scor / rezultat | Eroare de compilare |
sumalinii.cpp: In function 'int main()': sumalinii.cpp:27:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^ sumalinii.cpp:28:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &m); ^ sumalinii.cpp:47:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &a[i][j]); ^ /tmp/cc0NAseG.o: In function \`tf(void*)': sumalinii.cpp:(.text+0x39): undefined reference to \`pthread_mutex_lock' sumalinii.cpp:(.text+0x5a): undefined reference to \`pthread_mutex_unlock' /tmp/cc0NAseG.o: In function \`main': sumalinii.cpp:(.text.startup+0xc4): undefined reference to \`pthread_mutex_init' sumalinii.cpp:(.text.startup+0x152): undefined reference to \`pthread_create' sumalinii.cpp:(.text.startup+0x186): undefined reference to \`pthread_join' sumalinii.cpp:(.text.startup+0x1d4): undefined reference to \`pthread_mutex_destroy' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`__register_frame_info_bases': (.text+0x173e): undefined reference to \`pthread_mutex_lock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`__register_frame_info_bases': (.text+0x1755): undefined reference to \`pthread_mutex_unlock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`__register_frame_info_table_bases': (.text+0x1855): undefined reference to \`pthread_mutex_lock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`__register_frame_info_table_bases': (.text+0x186c): undefined reference to \`pthread_mutex_unlock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`__deregister_frame_info_bases': (.text+0x193d): undefined reference to \`pthread_mutex_lock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`__deregister_frame_info_bases': (.text+0x19af): undefined reference to \`pthread_mutex_unlock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`_Unwind_Find_FDE': (.text+0x1a7a): undefined reference to \`pthread_mutex_lock' /usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a(unwind-dw2-fde-dip.o): In function \`_Unwind_Find_FDE': (.text+0x1ac9): undefined reference to \`pthread_mutex_unlock' collect2: error: ld returned 1 exit status
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumaLinii 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ă.