Borderou de evaluare (job #807517)

Utilizator avatar Crimz0n25 Stefan Tanas Crimz0n25 IP ascuns
Problemă Punga (clasa a 7-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 1 feb. 2025 20:37:53 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void find_bag_dimensions(int64_t, int64_t&, int64_t&)': main.cpp:33:9: error: expected primary-expression before '__int128' 33 | __int128 delta = (__int128)S * S - 4 * (__int128)K; | ^~~~~~~~ main.cpp:35:13: error: 'delta' was not declared in this scope 35 | if (delta < 0) { | ^~~~~ main.cpp:40:52: error: 'delta' was not declared in this scope 40 | int64_t sqrt_delta = integer_sqrt((int64_t)delta); | ^~~~~ main.cpp:43:17: error: expected primary-expression before '__int128' 43 | while ((__int128)(sqrt_delta + 1) * (sqrt_delta + 1) <= delta) { | ^~~~~~~~ main.cpp:43:17: error: expected ')' before '__int128' 43 | while ((__int128)(sqrt_delta + 1) * (sqrt_delta + 1) <= delta) { | ~^~~~~~~~ | ) main.cpp:45:10: error: expected ')' before 'while' 45 | } | ^ | ) 46 | while ((__int128)(sqrt_delta) * sqrt_delta > delta) { | ~~~~~ main.cpp:43:15: note: to match this '(' 43 | while ((__int128)(sqrt_delta + 1) * (sqrt_delta + 1) <= delta) { | ^ main.cpp:46:17: error: expected primary-expression before '__int128' 46 | while ((__int128)(sqrt_delta) * sqrt_delta > delta) { | ^~~~~~~~ main.cpp:46:17: error: expected ')' before '__int128' 46 | while ((__int128)(sqrt_delta) * sqrt_delta > delta) { | ~^~~~~~~~ | ) main.cpp:48:10: error: expected ')' before 'int64_t' 48 | } | ^ | ) 49 | 50 | int64_t w = (S - sqrt_delta + 1) / 2; | ~~~~~~~ main.cpp:46:15: note: to match this '(' 46 | while ((__int128)(sqrt_delta) * sqrt_delta > delta) { | ^ main.cpp:50:17: warning: unused variable 'w' [-Wunused-variable] 50 | int64_t w = (S - sqrt_delta + 1) / 2; | ^ main.cpp:51:25: error: 'w' was not declared in this scope 51 | int64_t h = S - w; | ^