提交记录 5572


用户 题目 状态 得分 用时 内存 语言 代码长度
webmaster 2001. 元旦激光炮·改 Compile Error 0 0 ns 0 KB C++11 627 B
提交时间 评测时间
2018-08-30 01:30:51 2020-08-01 00:19:28
#include <algorithm> 
#include <cstring>

using namespace std;

int query_kth(const int *a, int n_a, const int *b, int n_b, const int *c, int n_c, int k)
{
    static const int *num[] = {a, b, c}, n[] = {n_a, n_b, n_c}, N = 3;
    static int i, j, l, m[N], s[N];
    memset(m, 0, sizeof(m));
    for (; k; k -= l + 1)
    {
        l = (k - N + 1) / N;
        for (i = j = 0; i < 3; ++i)
        {
            if (l + m[i] < n[i])
                s[i] = num[i][l + m[i]];
            else
                s[i] = 2e9;
            if (s[j] > s[i])
                j = i;
        }
        m[j] += l + 1;
    }
    return s[j];
}

CompilationN/AN/ACompile ErrorScore: N/A


Judge Duck Online | 评测鸭在线
Server Time: 2026-04-11 16:29:14 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠