/ Vijos /

记录详情

Wrong Answer

/in/foo.cc: In function 'int main()':
/in/foo.cc:103:28: warning: comparison of constant '3099' with boolean expression is always true [-Wbool-compare]
         if (100 <= roomNum <= 3099 && nights > 0){
             ~~~~~~~~~~~~~~~^~~~~~~
/in/foo.cc:103:17: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
         if (100 <= roomNum <= 3099 && nights > 0){
             ~~~~^~~~~~~~~~
/in/foo.cc:114:21: warning: iteration 29 invokes undefined behavior [-Waggressive-loop-optimizations]
       if (floorCnt[i] >= max){
           ~~~~~~~~~~^
/in/foo.cc:113:23: note: within this loop
     for (int i = 1; i <= 30; i++){
                     ~~^~~~~
/in/foo.cc:120:31: warning: 'validNum' may be used uninitialized in this function [-Wmaybe-uninitialized]
     avgNights = totalNights / double(validNum);
                               ^~~~~~~~~~~~~~~~
/in/foo.cc:120:15: warning: 'totalNights' may be used uninitialized in this function [-Wmaybe-uninitialized]
     avgNights = totalNights / double(validNum);
     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer 2ms 212.0 KiB

信息

递交者
类型
自测
题目
P1911 珠心算测验
语言
C++
递交时间
2020-07-08 16:28:36
评测时间
2020-07-08 16:28:36
评测机
分数
0
总耗时
2ms
峰值内存
212.0 KiB