Borderou de evaluare (job #809955)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Sume | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 20 feb. 2025 14:48:55 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:19:42: error: 'greater' is not a member of 'std'
19 | std::sort(numbers, numbers + n, std::greater<int>());
| ^~~~~~~
main.cpp:19:50: error: expected primary-expression before 'int'
19 | std::sort(numbers, numbers + n, std::greater<int>());
| ^~~
main.cpp:8:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | freopen("sume.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | freopen("sume.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | scanf("%d %d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~~
main.cpp:15:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%d", &numbers[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~