Runtime Error

foo.cc: In function 'int main()':
foo.cc:27:33: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   27 |                         if(a[i] = max) maxi = i;
      |                            ~~~~~^~~~~
foo.cc:39:41: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   39 |                                 if(a[i] = max) maxi = i;
      |                                    ~~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read Win, expect Lost. 2ms 256.0 KiB
#2 Accepted 2ms 256.0 KiB
#3 Accepted 2ms 256.0 KiB
#4 Accepted 7ms 384.0 KiB
#5 Accepted 5ms 256.0 KiB
#6 Runtime Error Segmentation fault 4ms 384.0 KiB
#7 Runtime Error Segmentation fault 3ms 384.0 KiB
#8 Runtime Error Segmentation fault 4ms 384.0 KiB
#9 Runtime Error Segmentation fault 2ms 384.0 KiB
#10 Runtime Error Segmentation fault 4ms 384.0 KiB

信息

递交者
类型
递交
题目
P1218 2 取最大数的博弈游戏
语言
C++
递交时间
2022-08-22 17:37:21
评测时间
2022-08-22 17:37:21
评测机
分数
40
总耗时
40ms
峰值内存
384.0 KiB