QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#202893#2479. Rescue MissionSolitaryDream#WA 2ms4032kbC++171.3kb2023-10-06 13:59:322023-10-06 13:59:32

Judging History

你现在查看的是最新测评结果

  • [2023-10-06 13:59:32]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:4032kb
  • [2023-10-06 13:59:32]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long
const int LIM = 1.1e18;
const int LEN = 150;
const int N = 100;
const int D = 100;
typedef pair<int, int> pii;
mt19937 rd(233);
int n;
int a[N][LEN];
map<int, vector<int>> mp;
signed main() {
    scanf("%lld", &n);
    printf("%lld\n", N * LEN);
    for (int i = 0; i < N; ++i) {
        int st = rd();
        for (int j = 0; j < 20; ++j) a[i][j] = st >> j & 1;
        for (int j = 0; j < LEN; ++j){
            // printf("%lld %lld %lld\n", 2 * i, j, a[i][j]);
        }
        for (int round = 0; round < D; ++round) {
            for (int j = 0, la = 0; j < LEN; ++j) {
                int tmp = a[i][j];
                a[i][j] += la;
                if (j + 1 < LEN) a[i][j] += a[i][j + 1];
                if (a[i][j] > LIM) a[i][j] = LIM;
                la = tmp;
            }
        }
        for (int j = 0; j < LEN; ++j) mp[a[i][j]].push_back(i << 10 | j);
    }
    vector<int> place;
    while (n) {
        auto it = --mp.upper_bound(n);
        n -= it->first;
        place.push_back(it->second.back());
        it->second.pop_back();
        if (it->second.empty()) mp.erase(it);
    }
    printf("%lld %lld\n", (int)place.size(), D);
    // for (auto x : place) printf("%lld %lld\n", (x >> 10) * 2, x & 1023);
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 4032kb

input:

5
0 2 4 6 8

output:

15000
5 100

result:

wrong answer 1st lines differ - expected: '1 4 2 -1 -1', found: '15000'