Borderou de evaluare (job #671157)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Baloane (clasele 11-12) | Compilator | cpp-32 |
Rundă | Tema Greedy | Status | evaluat |
Dată | 21 oct. 2022 11:58:29 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:21:6: error: invalid types 'spectacol [105][float]' for array subscript
21 | v[i].x=a-b+0.5;
| ^
main.cpp:22:6: error: invalid types 'spectacol [105][float]' for array subscript
22 | v[i].y=a+b-0.5;
| ^
main.cpp:24:18: error: invalid operands of types 'spectacol [105]' and 'float' to binary 'operator+'
24 | sort( v + 1, v + n + 1, cmp );
| ~ ^ ~
| | |
| | float
| spectacol [105]
main.cpp:26:10: error: invalid types 'spectacol [105][float]' for array subscript
26 | if( v[i].x >= aux ){
| ^
main.cpp:28:14: error: invalid types 'spectacol [105][float]' for array subscript
28 | aux = v[i].y;
| ^
main.cpp:25:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
25 | for( i = 1; i <= n; i++ )
| ^~~
main.cpp:30:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
30 | g << k;
| ^