Borderou de evaluare (job #753583)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Divprimi (clasa a 10-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 2 ian. 2024 16:31:33 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'bool main()::<unnamed struct>::operator()(unsigned int, unsigned int) const':
main.cpp:19:16: error: use of local variable with automatic storage from containing function
19 | if(ciur[a] != ciur[b]) {
| ^~~~
main.cpp:16:24: note: 'short unsigned int ciur [N]' declared here
16 | unsigned short int ciur[N]={0};
| ^~~~
main.cpp:19:27: error: use of local variable with automatic storage from containing function
19 | if(ciur[a] != ciur[b]) {
| ^~~~
main.cpp:16:24: note: 'short unsigned int ciur [N]' declared here
16 | unsigned short int ciur[N]={0};
| ^~~~
main.cpp:20:24: error: use of local variable with automatic storage from containing function
20 | return ciur[a] < ciur[b];
| ^~~~
main.cpp:16:24: note: 'short unsigned int ciur [N]' declared here
16 | unsigned short int ciur[N]={0};
| ^~~~
main.cpp:20:34: error: use of local variable with automatic storage from containing function
20 | return ciur[a] < ciur[b];
| ^~~~
main.cpp:16:24: note: 'short unsigned int ciur [N]' declared here
16 | unsigned short int ciur[N]={0};
| ^~~~
main.cpp: In function 'int main()':
main.cpp:27:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
27 | for(int i=2; i<=N; i++) {
| ~^~~
main.cpp:29:27: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
29 | for(int j=i; j<=N; j+=i) {
| ~^~~
main.cpp:34:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
34 | for(int i=1; i<=N; i++) {
| ~^~~