#3701
expandmat
Fie o matrice A
de dimensiuni 2
N
x 2
N
date. Aceasta se construiește astfel:
Se pornește de la o matrice de dimensiune 2 x 2
având ca elemente litere mici ale alfabetului englez. Matricea B
de dimensiune 2
k
x 2
k
se formează din patru submatrice de dimensiune 2
k-1
x 2
k-1
și se obține din matricea C
de dimensiune 2
k-1
x 2
k-1
. Se dau Q
triplete (i, j, L)
, cu semnificația: pe poziția A[i][j]
se află litera L
. Care este numărul maxim de triplete care se pot selecta astfel încât toate să fie adevărate?
Concursul Național Info Pro, Etapa IV
Problema | expandmat | Operații I/O |
expandmat.in /expandmat.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 256 MB
/
Stivă 8 MB
|
Id soluție | #28346589 | Utilizator | |
Fișier | expandmat.cpp | Dimensiune | 1.37 KB |
Data încărcării | 02 Martie 2021, 20:13 | Scor / rezultat | 34 puncte |
expandmat.cpp: In function 'int main()': expandmat.cpp:33:40: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] { freopen("expandmat.in", "r", stdin); ^ expandmat.cpp:34:42: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("expandmat.out", "w", stdout); ^ expandmat.cpp:37:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d\n", &n, &q); ^ expandmat.cpp:39:40: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d %c\n", &x, &y, &ch); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 7 | 7 | ||
2 | 0 secunde | OK. | 7 | 7 | ||
3 | 0 secunde | OK. | 7 | 7 | ||
4 | 0 secunde | Raspuns gresit. | 6 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 6 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 7 | 0 | ||
7 | 0.06 secunde | Raspuns gresit. | 4 | 0 | ||
8 | 0.052 secunde | Raspuns gresit. | 4 | 0 | ||
9 | 0.052 secunde | Raspuns gresit. | 5 | 0 | ||
10 | 0.056 secunde | Raspuns gresit. | 7 | 0 | ||
11 | 0.056 secunde | Raspuns gresit. | 7 | 0 | ||
12 | 0.06 secunde | OK. | 7 | 7 | ||
13 | 0.056 secunde | Raspuns gresit. | 3 | 0 | ||
14 | 0.052 secunde | Raspuns gresit. | 3 | 0 | ||
15 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
16 | 0.056 secunde | Raspuns gresit. | 5 | 0 | ||
17 | 0.056 secunde | Raspuns gresit. | 6 | 0 | ||
18 | 0.06 secunde | OK. | 6 | 6 | ||
Punctaj total | 34 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema expandmat 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ă.