Borderou de evaluare (job #3312924)

Utilizator lensuLensu Alexandru lensu Data 30 septembrie 2025 20:15:43
Problema Palindrom Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:1: error: expected ',' or ';' before 'const' 8 | const int NMAX = 2e5 + 1; | ^~~~~ main.cpp:9:23: error: 'NMAX' was not declared in this scope 9 | unsigned long long h1[NMAX], h2[NMAX], p[NMAX], BASE = 32, answer; | ^~~~ main.cpp:9:33: error: 'NMAX' was not declared in this scope 9 | unsigned long long h1[NMAX], h2[NMAX], p[NMAX], BASE = 32, answer; | ^~~~ main.cpp:9:42: error: 'NMAX' was not declared in this scope 9 | unsigned long long h1[NMAX], h2[NMAX], p[NMAX], BASE = 32, answer; | ^~~~ main.cpp: In function 'bool ispal(std::string)': main.cpp:14:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 14 | for(int i = 1; i <= s.size() - 1; i++) | ~~^~~~~~~~~~~~~~~ main.cpp: In function 'long long unsigned int gethash(long long unsigned int*, int, int)': main.cpp:21:37: error: 'p' was not declared in this scope 21 | return h[right] - h[left - 1] * p[right - left + 1]; | ^ main.cpp: In function 'int main()': main.cpp:36:5: error: 'p' was not declared in this scope 36 | p[0] = 1; | ^ main.cpp:39:9: error: 'h1' was not declared in this scope 39 | h1[i] = h1[i - 1] * BASE + int(s[i] - 'a' + 1); | ^~ main.cpp:44:9: error: 'h2' was not declared in this scope 44 | h2[n - i + 1] = h2[n - i] * BASE + int(s[i] - 'a' + 1); | ^~ main.cpp:50:20: error: 'h1' was not declared in this scope 50 | if(gethash(h1, i - length, i - 1) == gethash(h2, 1, length)) | ^~ main.cpp:50:54: error: 'h2' was not declared in this scope 50 | if(gethash(h1, i - length, i - 1) == gethash(h2, 1, length)) | ^~ main.cpp:57:22: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare] 57 | for(int i = 1; i <= answer; i++){ | ~~^~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?