1 条题解

  • 0
    @ 2026-8-19 10:01:37

    题解

    使用 queue<long long>:

    • push:队尾加入;
    • pop:删除队首;
    • front:查看队首;
    • back:查看队尾。

    时间复杂度 O(q)。

    • 1

    信息

    ID
    5163
    时间
    1000ms
    内存
    256MiB
    难度
    10
    标签
    递交数
    8
    已通过
    5
    上传者