#4097
circular1
O imprimantă circulară are litere mari ale alfabetului englezesc dispuse circular de la A
la Z
. Imprimanta are un indicator care inițial este plasat la litera A
. Imprimanta tipărește literele în două culori roșu sau albastru. Unele litere se tipăresc cu cerneală roșie, restul cu cerneală albastră. Pentru simplitate le vom numi litere roșii și litere albastre. Fiind date un șir de litere albastre nu neapărat distincte și mulțimea literelor roșii ale imprimantei, să se calculeze:
Problema | circular1 | Operații I/O |
circular.in /circular.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 128 MB
/
Stivă 64 MB
|
Id soluție | #36343797 | Utilizator | |
Fișier | circular1.cpp | Dimensiune | 1.66 KB |
Data încărcării | 19 Aprilie 2022, 19:55 | Scor / rezultat | 24 puncte |
circular1.cpp: In function 'int main()': circular1.cpp:22:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i = 0; i < strlen(a); i++) ^ circular1.cpp:32:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i = 0; i < strlen(a) - 1; i += 2) ^ circular1.cpp:36:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j = 0; j < strlen(r); j++) ^ circular1.cpp:52:26: warning: 'ch' may be used uninitialized in this function [-Wmaybe-uninitialized] a[i + 1] = ch; ^ circular1.cpp:56:22: warning: 'ct' may be used uninitialized in this function [-Wmaybe-uninitialized] tim += ct; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 4 | 4 | ||
2 | 0 secunde | OK. | 4 | 4 | ||
3 | 0 secunde | OK. | 4 | 4 | ||
4 | 0 secunde | OK. | 4 | 4 | ||
5 | 0 secunde | OK. | 4 | 4 | ||
6 | 0.544 secunde | OK. | 4 | 4 | ||
7 | 0.548 secunde | Raspuns gresit. | 4 | 0 | ||
8 | 0.548 secunde | Raspuns gresit. | 4 | 0 | ||
9 | 0.548 secunde | Raspuns gresit. | 4 | 0 | ||
10 | 0.548 secunde | Raspuns gresit. | 4 | 0 | ||
11 | 0.92 secunde | Raspuns gresit. | 4 | 0 | ||
12 | 0.94 secunde | Raspuns gresit. | 4 | 0 | ||
13 | 0.588 secunde | Raspuns gresit. | 4 | 0 | ||
14 | 0.98 secunde | Raspuns gresit. | 4 | 0 | ||
15 | 0.544 secunde | Raspuns gresit. | 4 | 0 | ||
16 | 0.944 secunde | Raspuns gresit. | 4 | 0 | ||
17 | 0.552 secunde | Raspuns gresit. | 4 | 0 | ||
18 | 0.556 secunde | Raspuns gresit. | 4 | 0 | ||
19 | 0.552 secunde | Raspuns gresit. | 4 | 0 | ||
20 | 0.552 secunde | Raspuns gresit. | 4 | 0 | ||
21 | 0.572 secunde | Raspuns gresit. | 4 | 0 | ||
22 | 0.856 secunde | Raspuns gresit. | 4 | 0 | ||
23 | 0.856 secunde | Raspuns gresit. | 4 | 0 | ||
24 | 0.756 secunde | Raspuns gresit. | 4 | 0 | ||
25 | 0.944 secunde | Raspuns gresit. | 4 | 0 | ||
Punctaj total | 24 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema circular1 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ă.