Borderou de evaluare (job #2944071)
Utilizator | Data | 21 noiembrie 2022 23:40:18 | |
---|---|---|---|
Problema | Paduri de multimi disjuncte | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:52: error: 'int time [300001]' redeclared as different kind of entity
8 | int n, m, colors[100001], mult1, mult2, time[300001], cnt = 1;
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148,
from /usr/include/c++/10/ext/atomicity.h:35,
from /usr/include/c++/10/bits/ios_base.h:39,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/fstream:38,
from main.cpp:1:
/usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
main.cpp: In function 'int main()':
main.cpp:29:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
29 | if(time[min(a, b)] == 0)
| ^
main.cpp:30:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
30 | time[min(a, b)] = cnt, cnt++;
| ^
main.cpp:30:33: error: assignment of read-only location '*(time + ((sizetype)std::min<int>(a, b)))'
30 | time[min(a, b)] = cnt, cnt++;
| ~~~~~~~~~~~~~~~~^~~~~
main.cpp:31:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
31 | if(time[max(a, b)] == 0)
| ^
main.cpp:32:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
32 | time[max(a, b)] = cnt, cnt++;
| ^
main.cpp:32:33: error: assignment of read-only location '*(time + ((sizetype)std::max<int>(a, b)))'
32 | time[max(a, b)] = cnt, cnt++;
| ~~~~~~~~~~~~~~~~^~~~~
main.cpp:33:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
33 | if(time[a] < time[b])
| ^
main.cpp:33:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
33 | if(time[a] < time[b])
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !