Borderou de evaluare (job #796501)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Gadfadăr (clasa 6-7) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 21 nov. 2024 21:59:20 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void solve()':
main.cpp:9:26: error: 'MAX_N' was not declared in this scope
9 | for (int i = 1; i <= MAX_N; ++i) {
| ^~~~~
main.cpp:11:13: error: 'sum_of_divisors' was not declared in this scope
11 | sum_of_divisors[j] += i; // Add i to all multiples of i
| ^~~~~~~~~~~~~~~
main.cpp: In function 'int32_t main()':
main.cpp:25:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
25 | for (size_t i = 0; i < n; ++i)
| ~~^~~
main.cpp:30:23: error: too many arguments to function 'void solve()'
30 | ll sum = solve(id);
| ~~~~~^~~~
main.cpp:8:6: note: declared here
8 | void solve() {
| ^~~~~
main.cpp:30:23: error: void value not ignored as it ought to be
30 | ll sum = solve(id);
| ~~~~~^~~~
main.cpp:20:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
20 | freopen("gadfadar.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:21:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | freopen("gadfadar.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~