Borderou de evaluare (job #2090563)
Utilizator | Data | 18 decembrie 2017 14:09:47 | |
---|---|---|---|
Problema | Sarac Sau Rege | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int rm(int, int)’:
user.cpp:13:50: error: ‘max’ was not declared in this scope
rmq[i]=max( rmq[i], rmq[i+(1<<(j-1))]);
^
user.cpp:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
user.cpp: In function ‘int main()’:
user.cpp:36:59: error: ‘max’ was not declared in this scope
printf("%d\n",max( rmq[a], rmq[b-(1<<lg[b-a+1])+1]));
^
user.cpp:21:9: warning: unused variable ‘l’ [-Wunused-variable]
int l,a,b,i,j;
^
user.cpp:21:17: warning: unused variable ‘j’ [-Wunused-variable]
int l,a,b,i,j;
^
user.cpp:18:41: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("saracsaurege.in","r",stdin);
^
user.cpp:19:43: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("saracsaurege.out","w",stdout);
^
user.cpp:20:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^
user.cpp:25:40: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
for(i=1;i<=n;i++) scanf("%d",&x[i]);
^
user.cpp:30:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&a,&b);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !