QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#202893 | #2479. Rescue Mission | SolitaryDream# | WA | 2ms | 4032kb | C++17 | 1.3kb | 2023-10-06 13:59:32 | 2023-10-06 13:59:32 |
Judging History
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'