Pagini recente » Cod sursa (job #321718) | Borderou de evaluare (job #2183263)
Borderou de evaluare (job #2183263)
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 |
1 | 0ms | 1312kb | OK | 10 |
2 | 0ms | 1312kb | OK | 10 |
3 | 0ms | 1320kb | OK | 10 |
4 | 0ms | 1328kb | OK | 10 |
5 | 12ms | 1828kb | OK | 10 |
6 | 40ms | 2224kb | OK | 10 |
7 | 44ms | 2224kb | OK | 10 |
8 | 44ms | 2228kb | OK | 10 |
9 | 44ms | 2224kb | OK | 10 |
10 | 44ms | 2224kb | OK | 10 |
Punctaj total | 100 |