#1470
Cunoscându-se data și ora intrării într-o parcare, data și ora plecării din parcare și tariful orar, să se determine timpul cât a stat mașina în parcare și suma de plată.
Olimpiada Municipala Informatica Iasi 2016
| Problema | Parcare | Operații I/O |
parcare.in/parcare.out
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
| Id soluție | #64673498 | Utilizator | |
| Fișier | parcare.cpp | Dimensiune | 1.21 KB |
| Data încărcării | 21 Mai 2026, 19:36 | Scor/rezultat | 100 puncte |
parcare.cpp: In function ‘int main()’: parcare.cpp:16:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 16 | if (l1 > 1) t1 += 31; if (l1 > 2) t1 += 28; if (l1 > 3) t1 += 31; | ^~ parcare.cpp:16:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | if (l1 > 1) t1 += 31; if (l1 > 2) t1 += 28; if (l1 > 3) t1 += 31; | ^~ parcare.cpp:17:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 17 | if (l1 > 4) t1 += 30; if (l1 > 5) t1 += 31; if (l1 > 6) t1 += 30; | ^~ parcare.cpp:17:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 17 | if (l1 > 4) t1 += 30; if (l1 > 5) t1 += 31; if (l1 > 6) t1 += 30; | ^~ parcare.cpp:18:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 18 | if (l1 > 7) t1 += 31; if (l1 > 8) t1 += 31; if (l1 > 9) t1 += 30; | ^~ parcare.cpp:18:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 18 | if (l1 > 7) t1 += 31; if (l1 > 8) t1 += 31; if (l1 > 9) t1 += 30; | ^~ parcare.cpp:19:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 19 | if (l1 > 10) t1 += 31; if (l1 > 11) t1 += 30; | ^~ parcare.cpp:19:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 19 | if (l1 > 10) t1 += 31; if (l1 > 11) t1 += 30; | ^~ parcare.cpp:22:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 22 | if (l2 > 1) t2 += 31; if (l2 > 2) t2 += 28; if (l2 > 3) t2 += 31; | ^~ parcare.cpp:22:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 22 | if (l2 > 1) t2 += 31; if (l2 > 2) t2 += 28; if (l2 > 3) t2 += 31; | ^~ parcare.cpp:23:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 23 | if (l2 > 4) t2 += 30; if (l2 > 5) t2 += 31; if (l2 > 6) t2 += 30; | ^~ parcare.cpp:23:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 23 | if (l2 > 4) t2 += 30; if (l2 > 5) t2 += 31; if (l2 > 6) t2 += 30; | ^~ parcare.cpp:24:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 24 | if (l2 > 7) t2 += 31; if (l2 > 8) t2 += 31; if (l2 > 9) t2 += 30; | ^~ parcare.cpp:24:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 24 | if (l2 > 7) t2 += 31; if (l2 > 8) t2 += 31; if (l2 > 9) t2 += 30; | ^~ parcare.cpp:25:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 25 | if (l2 > 10) t2 += 31; if (l2 > 11) t2 += 30; | ^~ parcare.cpp:25:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 25 | if (l2 > 10) t2 += 31; if (l2 > 11) t2 += 30; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 5 | 5 | ||
| 2 | 0.002 secunde | OK. | 5 | 5 | ||
| 3 | 0.001 secunde | OK. | 5 | 5 | ||
| 4 | 0.001 secunde | OK. | 5 | 5 | ||
| 5 | 0.002 secunde | OK. | 5 | 5 | ||
| 6 | 0.002 secunde | OK. | 5 | 5 | ||
| 7 | 0.002 secunde | OK. | 5 | 5 | ||
| 8 | 0.001 secunde | OK. | 5 | 5 | ||
| 9 | 0.002 secunde | OK. | 5 | 5 | ||
| 10 | 0.002 secunde | OK. | 5 | 5 | ||
| 11 | 0.002 secunde | OK. | 5 | 5 | ||
| 12 | 0.001 secunde | OK. | 5 | 5 | ||
| 13 | 0.001 secunde | OK. | 5 | 5 | ||
| 14 | 0.001 secunde | OK. | 5 | 5 | ||
| 15 | 0.001 secunde | OK. | 5 | 5 | ||
| 16 | 0.001 secunde | OK. | 5 | 5 | ||
| 17 | 0.001 secunde | OK. | 5 | 5 | ||
| 18 | 0.001 secunde | OK. | 5 | 5 | ||
| 19 | 0.001 secunde | OK. | 5 | 5 | ||
| 20 | 0.001 secunde | OK. | 5 | 5 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Parcare 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ă.