/ Vijos /

记录详情

Accepted

/in/foo.cc: In member function 'void heap::push(int)':
/in/foo.cc:14:6: warning: operation on 'i' may be undefined [-Wsequence-point]
   h[i>>=1]^=h[i]^=h[i>>1]^=h[i];
     ~^~~~
/in/foo.cc: In member function 'void heap::pop()':
/in/foo.cc:20:30: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
         for(h[i=1]=h[p--];t^p+1;h[i=t]^=h[i]^=h[t]^=h[i])
                             ~^~
/in/foo.cc:20:36: warning: operation on 'i' may be undefined [-Wsequence-point]
         for(h[i=1]=h[p--];t^p+1;h[i=t]^=h[i]^=h[t]^=h[i])
                                   ~^~
/in/foo.cc:21:14: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    t=(i<<1)+1<=p&h[(i<<1)+1]<h[i]&h[(i<<1)+1]<h[i<<1]?(i<<1)+1:i<<1<=p && h[i<<1]<h[i]?i<<1:i=p+1;
      ~~~~~~~~^~~
/in/foo.cc:21:46: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    t=(i<<1)+1<=p&h[(i<<1)+1]<h[i]&h[(i<<1)+1]<h[i<<1]?(i<<1)+1:i<<1<=p && h[i<<1]<h[i]?i<<1:i=p+1;
                                   ~~~~~~~~~~~^~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:26:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j,n,a,b,js=0;
        ^
# 状态 耗时 内存占用
#1 Accepted 6ms 344.0 KiB
#2 Accepted 3ms 368.0 KiB
#3 Accepted 11ms 348.0 KiB
#4 Accepted 10ms 384.0 KiB
#5 Accepted 18ms 368.0 KiB
#6 Accepted 5ms 376.0 KiB
#7 Accepted 15ms 348.0 KiB
#8 Accepted 9ms 384.0 KiB
#9 Accepted 11ms 348.0 KiB
#10 Accepted 8ms 368.0 KiB

信息

递交者
类型
递交
题目
P1097 合并果子
语言
C++
递交时间
2018-10-03 21:49:35
评测时间
2018-10-03 21:49:35
评测机
分数
100
总耗时
100ms
峰值内存
384.0 KiB