记录详情

Runtime Error

/in/foo.cc: In function 'int SelInter(int*, int, int*, int)':
/in/foo.cc:10:27: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     if(array1[i]=array2[j]) 
                           ^
/in/foo.cc:17:14: warning: array subscript is above array bounds [-Warray-bounds]
  return m[100];
         ~~~~~^
/in/foo.cc:7:10: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for(int i;i<k1;i++)
          ^
/in/foo.cc:9:11: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
   for(int j;j<k2;j++){
           ^
/in/foo.cc: In function 'int main(int, char**)':
/in/foo.cc:17:14: warning: array subscript is above array bounds [-Warray-bounds]
  return m[100];
         ~~~~~^
/in/foo.cc:17:14: warning: array subscript is above array bounds [-Warray-bounds]
  return m[100];
         ~~~~~^
/in/foo.cc:7:10: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
  for(int i;i<k1;i++)
          ^
/in/foo.cc:7:10: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
/in/foo.cc:9:14: warning: 'n3' may be used uninitialized in this function [-Wmaybe-uninitialized]
   for(int j;j<k2;j++){
             ~^~~
/in/foo.cc:21:42: note: 'n3' was declared here
  int a1[10000],a2[10000],a3[10000],n1,n2,n3;
                                          ^~
/in/foo.cc:9:11: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
   for(int j;j<k2;j++){
           ^
/in/foo.cc:9:11: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 212.0 KiB
#2 Runtime Error 1ms 208.0 KiB
#3 Wrong Answer 1ms 208.0 KiB
#4 Runtime Error 1ms 204.0 KiB
#5 Runtime Error 1ms 200.0 KiB

信息

递交者
类型
递交
题目
A10-4 集合的交集
比赛
数据结构课堂练习9-16
语言
C++
递交时间
2019-09-16 11:11:01
评测时间
2019-09-16 11:11:01
评测机
分数
0
总耗时
6ms
峰值内存
212.0 KiB