Borderou de evaluare (job #1877051)

Utilizator tudorcomanTudor Coman tudorcoman Data 12 februarie 2017 21:14:54
Problema Char Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:34:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] ++ f[s[i]]; ^ user.cpp:39:22: warning: array subscript has type ‘char’ [-Wchar-subscripts] p[sortat[i - 1]] = v[ind ++]; ^ user.cpp:40:18: warning: array subscript has type ‘char’ [-Wchar-subscripts] p[sortat[N - 1]] = v[ind ++]; ^ user.cpp:45:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] vec.push_back(pii(max(1, 1 + i - p[s[i]]), min(N, 1 + i + p[s[i]]))); ^ user.cpp:45:69: warning: array subscript has type ‘char’ [-Wchar-subscripts] vec.push_back(pii(max(1, 1 + i - p[s[i]]), min(N, 1 + i + p[s[i]]))); ^ user.cpp:49:11: warning: array subscript has type ‘char’ [-Wchar-subscripts] if(p[i] == Maxim) ^ user.cpp:50:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] ans += f[i]; ^ user.cpp:18:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("char.in", "r", stdin); ^ user.cpp:19:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("char.out", "w", stdout); ^ user.cpp:21:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d\n", &N); ^ user.cpp:22:10: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ user.cpp:27:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &M); ^ user.cpp:29:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &v[i]); ^ /tmp/ccOBHudU.o: In function `main': user.cpp:(.text.startup+0x6a): warning: the `gets' function is dangerous and should not be used.
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms292kbOK10
20ms292kbOK10
30ms292kbOK10
40ms292kbOK10
50ms296kbOK10
60ms292kbOK10
70ms324kbOK10
80ms428kbOK10
90ms428kbOK10
100ms428kbOK10
Punctaj total100

Ceva nu functioneaza?