#3491
Se dă o matrice cu n
linii și m
coloane, formată din 2
tipuri de caractere: '$'
și '.'
. Trebuie acoperite toate caracterele '.'
cu piese 1x2
sau 2x1
. Dacă se poate realiza acoperirea într-un mod unic, se va afișa matricea completată, altfel se va afișa mesajul "altadata"
.
Problema | Fill_1221 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.03 secunde | Limita memorie |
Total: 21 MB
/
Stivă 12 MB
|
Id soluție | #55762280 | Utilizator | |
Fișier | fill_1221.cpp | Dimensiune | 2.08 KB |
Data încărcării | 25 Ianuarie 2025, 12:01 | Scor / rezultat | 0 puncte |
fill_1221.cpp: In function 'int main()': fill_1221.cpp:19:28: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'char*' [-Wformat=] scanf("%d%d",&c); ^ fill_1221.cpp:19:28: warning: format '%d' expects a matching 'int*' argument [-Wformat=] fill_1221.cpp:43:43: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=] if(a[i][j]==0) printf("%s",'$'); ^ fill_1221.cpp:44:43: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=] if(a[i][j]==2) printf("%s",'^'); ^ fill_1221.cpp:45:43: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=] if(a[i][j]==3) printf("%s",'v'); ^ fill_1221.cpp:46:43: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=] if(a[i][j]==4) printf("%s",'<'); ^ fill_1221.cpp:47:43: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=] if(a[i][j]==5) printf("%s",'>'); ^ fill_1221.cpp:49:25: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=] printf("%s",'\n'); ^ fill_1221.cpp:13:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&n,&m); ^ fill_1221.cpp:19:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&c); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0.036 secunde | Caught fatal signal 11 | 20 | 0 | ||
1 | 0.012 secunde | Caught fatal signal 11 | 20 | 0 | ||
2 | 0.044 secunde | Caught fatal signal 11 | 20 | 0 | ||
3 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
4 | 0.044 secunde | Caught fatal signal 11 | 20 | 0 | ||
5 | 0 secunde | Caught fatal signal 11 | 5 | 0 | Exemplu | |
6 | 0 secunde | Caught fatal signal 11 | 5 | 0 | Exemplu | |
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Fill_1221 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ă.