QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#24439 | #3507. Broken Device 2 | Qingyu | 5 | 18ms | 3736kb | C++20 | 1.2kb | 2022-03-30 20:02:39 | 2023-01-22 10:33:11 |
Judging History
This is a historical verdict posted at 2023-01-22 10:33:11.
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2022-03-30 20:02:39]
- Submitted
Anna
#include "Anna.h"
#include <bits/stdc++.h>
namespace {
int variable_example = 0;
auto valToVector(int64_t x) {
for (int len = 0; ; ++len) {
if (x > 2 * len) x -= 2 * len + 1;
else {
std::vector<int> a(len), b(len);
int part_a = std::min(len, (int)x);
int part_b = x - part_a;
for (int j = 0; j < part_a; ++j)
a[j] = 1;
for (int j = 0; j < part_b; ++j)
b[j] = 1;
return std::make_pair(a, b);
}
}
throw;
}
}
int Declare() {
return 2000;
}
std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
long long t = A / 4'000'000;
auto [X, Y] = valToVector(A - t * 4'000'000);
int a = (t >> 1 & 1), b = t & 1;
std::vector<int> _X, _Y;
_X.push_back(a), _Y.push_back(a);
for (int x : X) _X.push_back(x);
for (int y : Y) _Y.push_back(y);
_X.push_back(b), _Y.push_back(b);
return std::make_pair(_X, _Y);
}
Bruno
#include "Bruno.h"
#include <bits/stdc++.h>
namespace {
int variable_example = 0;
}
long long Bruno(std::vector<int> u) {
int a = u.front(), b = u.back();
int len = u.size() / 2 - 2;
int ones = 0;
for (int x : u)
ones += x;
ones -= a * 2 + b * 2;
int64_t ans = 0;
for (int i = 0; i < len; ++i)
ans += 2 * i + 1;
ans += ones;
ans += (a * 2 + b) * 4'000'000;
return ans;
}
詳細信息
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 9ms
memory: 3604kb
input:
1000 6 000000 6 001000 6 010010 8 00000000 8 00100000 8 00100100 8 00101100 8 00111010 10 0000000000 10 0010000000 10 0001001000 10 0110001000 10 0010111000 10 0101111000 10 0011111100 12 000000000000 12 010000000000 12 000110000000 12 000010101000 12 001110001000 12 001011011000 12 011011110000 12 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
input:
output:
2000
result:
ok m = 2000
Test #2:
score: 5
Accepted
time: 2ms
memory: 3596kb
input:
1000 66 011101111111111010101001101101111110000100011010011101011100011100 66 001111111111111111111111011010111101110011100100111000000001001000 66 001111111111111111111010101111001110000101110111101110100010000100 66 001111111111111111111111111001101001101100000010100000111110111010 66 001111111111...
output:
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 ...
input:
output:
2000
result:
ok m = 2000
Subtask #2:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 18ms
memory: 3736kb
input:
1000 3096 00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
output:
2392149 3237369 2749856 2195337 1287710 2355845 3335395 3368329 3788433 3809503 2138066 3919234 3445205 1969808 2611344 2738622 102224 3755713 692366 1999357 1791368 1080377 2887807 292605 3650162 2047893 2886267 1927376 3812776 1734518 521926 417160 3517895 3437895 1741109 2515055 2130145 1493727 1...
input:
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #3:
score: 0
Skipped
Subtask #4:
score: 0
Skipped
Subtask #5:
score: 0
Skipped
Subtask #6:
score: 0
Skipped