Borderou de evaluare (job #600121)

Utilizator avatar zeekliviu Liviu Ioan Zecheru zeekliviu IP ascuns
Problemă Char (clasa a 7-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 10 iun. 2021 18:35:31 Scor 100

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:16:15: warning: array subscript has type 'char' [-Wchar-subscripts] 16 | f[text[i] = fgetc( fin ) - 'a'] = 1; | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~ main.cpp:28:18: warning: array subscript has type 'char' [-Wchar-subscripts] 28 | if ( f[text[i]] > max ) { | ~~~~~~^ main.cpp:29:21: warning: array subscript has type 'char' [-Wchar-subscripts] 29 | max = f[text[i]]; | ~~~~~~^ main.cpp:31:25: warning: array subscript has type 'char' [-Wchar-subscripts] 31 | } else if ( f[text[i]] == max ) | ~~~~~~^ main.cpp:34:41: warning: array subscript has type 'char' [-Wchar-subscripts] 34 | if ( cap[j = i + PMAX + 1 + f[text[i]]] < (m = i + PMAX + 1 - f[text[i]]) ) | ~~~~~~^ main.cpp:34:75: warning: array subscript has type 'char' [-Wchar-subscripts] 34 | if ( cap[j = i + PMAX + 1 + f[text[i]]] < (m = i + PMAX + 1 - f[text[i]]) ) | ~~~~~~^ main.cpp:14:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 14 | fscanf( fin, "%d ", &n ); | ~~~~~~^~~~~~~~~~~~~~~~~~ main.cpp:17:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 17 | fscanf( fin, "%d", &h ); | ~~~~~~^~~~~~~~~~~~~~~~~ main.cpp:21:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 21 | fscanf( fin, "%d", &f[j++] ); // stocam puterea in vectorul de frecventa | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~ main.cpp:32:11: warning: 'nmax' may be used uninitialized in this function [-Wmaybe-uninitialized] 32 | nmax++; | ~~~~^~
Test Timp execuție Memorie folosită Mesaj Punctaj/test
1 1 ms 262 kb OK 10
2 1 ms 262 kb OK 10
3 1 ms 262 kb OK 10
4 1 ms 262 kb OK 10
5 1 ms 262 kb OK 10
6 1 ms 262 kb OK 10
7 1 ms 262 kb OK 10
8 1 ms 393 kb OK 10
9 1 ms 389 kb OK 10
10 1 ms 262 kb OK 10
Punctaj total 100