#879
Să se determine necunoscutele dintr-o listă de relații date.
| Problema | Egalitati | Operații I/O |
egalitati.in/egalitati.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62188167 | Utilizator | |
| Fișier | egalitati.cpp | Dimensiune | 2.30 KB |
| Data încărcării | 13 Ianuarie 2026, 09:26 | Scor/rezultat | 100 puncte |
egalitati.cpp: In function 'int convToInt(int, int&)': egalitati.cpp:12:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(isdigit(liste[i][j]) && j < liste[i].size()) ^ egalitati.cpp: In function 'int eval(int)': egalitati.cpp:28:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0; j < liste[i].size(); j++) ^ egalitati.cpp:65:16: warning: array subscript has type 'char' [-Wchar-subscripts] if(freq[nec] != -1) ^ egalitati.cpp:66:24: warning: array subscript has type 'char' [-Wchar-subscripts] return freq[nec]; ^ egalitati.cpp:70:34: warning: array subscript has type 'char' [-Wchar-subscripts] nr1 = eval(necToLista[ch1]); ^ egalitati.cpp:72:34: warning: array subscript has type 'char' [-Wchar-subscripts] nr2 = eval(necToLista[ch2]); ^ egalitati.cpp:78:21: warning: array subscript has type 'char' [-Wchar-subscripts] freq[nec] = nr1 + nr2; ^ egalitati.cpp:82:21: warning: array subscript has type 'char' [-Wchar-subscripts] freq[nec] = nr1 * nr2; ^ egalitati.cpp:87:17: warning: array subscript has type 'char' [-Wchar-subscripts] freq[nec] = nr1; ^ egalitati.cpp:91:20: warning: array subscript has type 'char' [-Wchar-subscripts] return freq[nec]; ^ egalitati.cpp:27:39: warning: variable 'egal' set but not used [-Wunused-but-set-variable] bool add = false, inmult = false, egal = false; ^ egalitati.cpp: In function 'int main()': egalitati.cpp:106:31: warning: array subscript has type 'char' [-Wchar-subscripts] necToLista[liste[i][0]] = i; ^ egalitati.cpp:111:28: warning: array subscript has type 'char' [-Wchar-subscripts] if(freq[liste[i][0]] == -1) ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0 secunde | OK. | 20 | 20 | ||
| 3 | 0 secunde | OK. | 20 | 20 | ||
| 4 | 0 secunde | OK. | 20 | 20 | ||
| 5 | 0 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Egalitati 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ă.