记录详情

Runtime Error

foo.cc: In function 'node* insert(node*, int)':
foo.cc:50:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   50 |         if (i = head)
      |             ~~^~~~~~
foo.cc: In function 'int main()':
foo.cc:60:16: warning: unused variable 'i' [-Wunused-variable]
   60 |         int n, i, t;
      |                ^
foo.cc:62:30: warning: unused variable 'p' [-Wunused-variable]
   62 |         node* head = NULL, * p = NULL;
      |                              ^
foo.cc: In function 'node* insert(node*, int)':
foo.cc:57:1: warning: control reaches end of non-void function [-Wreturn-type]
   57 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 412.0 KiB
#2 Runtime Error Segmentation fault 4ms 412.0 KiB
#3 Wrong Answer Read 300, expect 11. 3ms 368.0 KiB
#4 Accepted 3ms 412.0 KiB
#5 Wrong Answer Read 222, expect 11. 3ms 412.0 KiB

信息

递交者
类型
递交
题目
P2994 A7-5 数组的有序插入函数
语言
C++
递交时间
2023-11-25 11:33:21
评测时间
2023-11-25 11:33:21
评测机
分数
40
总耗时
20ms
峰值内存
412.0 KiB