Borderou de evaluare (job #2183263)

Utilizator rares404AlShaytan - Balasescu Rares rares404 Data 22 martie 2018 22:49:47
Problema Sword Art Online Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:5:1: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] while (not pq.empty() and k and hp <= 0 )k -- ,hp += pq.top() ,pq.pop() ;if (hp < 0){printf("%lld" ,--i) ;return 0 ;} ^~~~~ user.cpp:5:74: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘while’ while (not pq.empty() and k and hp <= 0 )k -- ,hp += pq.top() ,pq.pop() ;if (hp < 0){printf("%lld" ,--i) ;return 0 ;} ^~ user.cpp:3:29: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sao.in","r",stdin) ;freopen("sao.out","w",stdout) ;long long n ,k ,hp ,a ,i ;scanf("%lld%lld%lld" ,&n ,&k ,&hp) ; ^ user.cpp:3:60: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sao.in","r",stdin) ;freopen("sao.out","w",stdout) ;long long n ,k ,hp ,a ,i ;scanf("%lld%lld%lld" ,&n ,&k ,&hp) ; ^ user.cpp:3:122: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sao.in","r",stdin) ;freopen("sao.out","w",stdout) ;long long n ,k ,hp ,a ,i ;scanf("%lld%lld%lld" ,&n ,&k ,&hp) ; ^ user.cpp:4:58: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for (i = 1 ; i <= n ; ++ i){scanf("%lld",&a) ,pq.push(a) ;hp -= a ; ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms1312kbOK10
20ms1312kbOK10
30ms1320kbOK10
40ms1328kbOK10
512ms1828kbOK10
640ms2224kbOK10
744ms2224kbOK10
844ms2228kbOK10
944ms2224kbOK10
1044ms2224kbOK10
Punctaj total100

Ceva nu functioneaza?