#726
Acoperire1
Dintr-o suprafaţă pătrată cu latura de N
unităţi care este formată din N*N
pătrăţele cu latura de o unitate se decupează cele 4
pătrăţele din colţuri.
Determinaţi o modalitate de a acoperi suprafaţa în întregime cu piese de arie 4
unităţi care au forma următoare:
Piesele pot fi si rotite sau întoarse putând astfel să folosim toate cele 8
moduri de a le aşeza.
Lot Juniori, Arad, 2011
Problema | Acoperire1 | Operații I/O |
acoperire1.in /acoperire1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 16 MB
|
Id soluție | #50607771 | Utilizator | |
Fișier | acoperire1.c | Dimensiune | 2.41 KB |
Data încărcării | 17 Aprilie 2024, 01:27 | Scor / rezultat | Eroare de compilare |
acoperire1.c: In function 'stanga': acoperire1.c:41:8: error: expected expression before '{' token tile({3, 1}, 2, 2, 1); ^ acoperire1.c:41:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:42:8: error: expected expression before '{' token tile({3, 1}, 3, 1, 2); ^ acoperire1.c:42:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:43:8: error: expected expression before '{' token tile({2, 1}, 3, 2, 3); ^ acoperire1.c:43:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:45:8: error: expected expression before '{' token tile({1, 1}, 1, 2, 4); ^ acoperire1.c:45:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:47:10: error: expected expression before '{' token tile({0, 1}, 6, 0, 5); ^ acoperire1.c:47:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:48:10: error: expected expression before '{' token tile({1, -1}, 6, 2, 6); ^ acoperire1.c:48:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:49:10: error: expected expression before '{' token tile({2, -1}, 6, 1, 7); ^ acoperire1.c:49:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:54:12: error: expected expression before '{' token tile({2, -1}, lin, col, i++); ^ acoperire1.c:54:12: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:55:12: error: expected expression before '{' token tile({2, 1}, lin+1, col+3, i++); ^ acoperire1.c:55:12: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:52:9: warning: unused variable 'col' [-Wunused-variable] int col = 0; ^ acoperire1.c: In function 'dreapta': acoperire1.c:62:8: error: expected expression before '{' token tile({1, -1}, 2, n-3, i++); ^ acoperire1.c:62:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:63:8: error: expected expression before '{' token tile({1, -1}, 3, n-2, i++); ^ acoperire1.c:63:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:64:8: error: expected expression before '{' token tile({2, -1}, 3, n-3, i++); ^ acoperire1.c:64:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:65:8: error: expected expression before '{' token tile({3, -1}, 1, n-3, i++); ^ acoperire1.c:65:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:67:10: error: expected expression before '{' token tile({0, -1}, 6, n-1, i++); ^ acoperire1.c:67:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:68:10: error: expected expression before '{' token tile({3, 1}, 6, n-3, i++); ^ acoperire1.c:68:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:69:10: error: expected expression before '{' token tile({2, 1}, 6, n-2, i++); ^ acoperire1.c:69:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:73:12: error: expected expression before '{' token tile({2, 1}, lin, col, i++); ^ acoperire1.c:73:12: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:74:12: error: expected expression before '{' token tile({2, -1}, lin+1, col-3, i++); ^ acoperire1.c:74:12: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:71:9: warning: unused variable 'col' [-Wunused-variable] int col = n-1; ^ acoperire1.c: In function 'collum': acoperire1.c:82:10: error: expected expression before '{' token tile({1, -1}, lin+3, col, i++); ^ acoperire1.c:82:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:83:10: error: expected expression before '{' token tile({3, -1}, lin, col+1, i++); ^ acoperire1.c:83:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c: In function 'top': acoperire1.c:90:10: error: expected expression before '{' token tile({2, -1}, lin, col, i++); ^ acoperire1.c:90:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:91:10: error: expected expression before '{' token tile({0, -1}, lin+1, col+3, i++); ^ acoperire1.c:91:10: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c: In function 'main': acoperire1.c:118:8: error: expected expression before '{' token tile({0, -1}, 1, 4, i++); ^ acoperire1.c:118:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:119:8: error: expected expression before '{' token tile({0, 1}, 1, n-5, i++); ^ acoperire1.c:119:8: error: too few arguments to function 'tile' acoperire1.c:26:6: note: declared here void tile(piesa p, int lin, int col, int val){ ^ acoperire1.c:100:9: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d", &n); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Acoperire1 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ă.