Accepted

In file included from /usr/include/c++/12/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:65,
                 from /in/foo.cc:1:
In function 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater<int> >]',
    inlined from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater<int> >]' at /usr/include/c++/12/bits/stl_algo.h:1940:31,
    inlined from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = greater<int>]' at /usr/include/c++/12/bits/stl_algo.h:4853:18,
    inlined from 'int main()' at /in/foo.cc:12:6:
/usr/include/c++/12/bits/stl_algo.h:1849:32: warning: array subscript 17 is outside array bounds of 'int [15]' [-Warray-bounds]
 1849 |           std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
      |           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:3:11: note: at offset 68 into object 'b' of size 60
    3 | int a[15],b[15],c[15],nb,nc;
      |           ^
# 状态 耗时 内存占用
#1 Accepted 2ms 476.0 KiB
#2 Accepted 1ms 468.0 KiB
#3 Accepted 1ms 484.0 KiB
#4 Accepted 2ms 448.0 KiB
#5 Accepted 1ms 344.0 KiB
#6 Accepted 1ms 520.0 KiB
#7 Accepted 1ms 472.0 KiB
#8 Accepted 1ms 532.0 KiB
#9 Accepted 1ms 532.0 KiB
#10 Accepted 1ms 532.0 KiB

信息

递交者
类型
递交
题目
P3091 整数排序 pta202307T1
语言
C++
递交时间
2026-04-15 18:07:36
评测时间
2026-04-15 18:07:36
评测机
分数
100
总耗时
18ms
峰值内存
532.0 KiB