Borderou de evaluare (job #2227065)

Utilizator inquisitorAnders inquisitor Data 31 iulie 2018 09:13:46
Problema Generare de permutari Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘bool next_permutation(int*, char)’: user.cpp:7:30: warning: array subscript has type ‘char’ [-Wchar-subscripts] while(i && v[i - 1] > v[i]) --i; ^ user.cpp:13:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] while(v[j] < v[i - 1]) --j; ^ user.cpp:15:30: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i - 1] = v[i - 1] ^ v[j] ^ (v[j] = v[i - 1]); ^ user.cpp:15:38: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i - 1] = v[i - 1] ^ v[j] ^ (v[j] = v[i - 1]); ^ user.cpp:15:40: warning: operation on ‘*(v + ((sizetype)(((unsigned int)j) * 4u)))’ may be undefined [-Wsequence-point] v[i - 1] = v[i - 1] ^ v[j] ^ (v[j] = v[i - 1]); ~~~~~~^~~~~~~~~~~ user.cpp:19:12: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i] = v[i] ^ v[j] ^ (v[j] = v[i]); ^ user.cpp:19:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i] = v[i] ^ v[j] ^ (v[j] = v[i]); ^ user.cpp:19:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i] = v[i] ^ v[j] ^ (v[j] = v[i]); ^ user.cpp:19:34: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i] = v[i] ^ v[j] ^ (v[j] = v[i]); ^ user.cpp:19:41: warning: array subscript has type ‘char’ [-Wchar-subscripts] v[i] = v[i] ^ v[j] ^ (v[j] = v[i]); ^ user.cpp:19:36: warning: operation on ‘*(v + ((sizetype)(((unsigned int)j) * 4u)))’ may be undefined [-Wsequence-point] v[i] = v[i] ^ v[j] ^ (v[j] = v[i]); ~~~~~~^~~~~~~ user.cpp: At global scope: user.cpp:3:37: warning: always_inline function might not be inlinable [-Wattributes] __attribute__((always_inline)) bool next_permutation(int v[], char N) ^~~~~~~~~~~~~~~~ user.cpp: In function ‘int main()’: user.cpp:27:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("permutari.in", "r", stdin); ^ user.cpp:28:42: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("permutari.out", "w", stdout); ^ user.cpp:34:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms864kbOK20
20ms756kbOK20
30ms760kbOK20
40ms756kbOK20
54ms1328kbOK20
Punctaj total100

Ceva nu functioneaza?