Accepted

In file included from /nix/gcc-13.2.0/include/c++/13.2.0/algorithm:61,
                 from stdc++.h:51:
In function ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’,
    inlined from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1942:5,
    inlined from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = int*]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:4861:18,
    inlined from ‘int main()’ at foo.cc:8:6:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1947:32: warning: array subscript 4 is outside array bounds of ‘int [3]’ [-Warray-bounds=]
 1947 |           std::__introsort_loop(__first, __last,
      |           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
 1948 |                                 std::__lg(__last - __first) * 2,
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1949 |                                 __comp);
      |                                 ~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:3:5: note: at offset 16 into object ‘a’ of size 12
    3 | int a[3],minn=INT_MAX,xb;
      |     ^
In function ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’,
    inlined from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1950:31,
    inlined from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1942:5,
    inlined from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = int*]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:4861:18,
    inlined from ‘int main()’ at foo.cc:8:6:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1864:30: warning: array subscript 4 is outside array bounds of ‘int [3]’ [-Warray-bounds=]
 1864 |         std::__insertion_sort(__first, __last, __comp);
      |         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:3:5: note: at offset 16 into object ‘a’ of size 12
    3 | int a[3],minn=INT_MAX,xb;
      |     ^
foo.cc:9:29: warning: array subscript 3 is above array bounds of ‘int [3]’ [-Warray-bounds=]
    9 |         cout<<a[2]<<' '<<a[3]<<endl;
      |                             ^
foo.cc:3:5: note: while referencing ‘a’
    3 | int a[3],minn=INT_MAX,xb;
      |     ^
# 状态 耗时 内存占用
#1 Accepted 2ms 764.0 KiB
#2 Accepted 2ms 552.0 KiB
#3 Accepted 2ms 536.0 KiB
#4 Accepted 2ms 324.0 KiB
#5 Accepted 2ms 536.0 KiB

信息

递交者
类型
递交
题目
P1057 A1-2 分支结构练习:三数的特征值
语言
C++
递交时间
2024-04-06 10:03:31
评测时间
2024-04-06 10:03:31
评测机
分数
100
总耗时
13ms
峰值内存
764.0 KiB