QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#131659 | #2674. Vision program | somethingnew# | 21 | 986ms | 6084kb | C++20 | 7.4kb | 2023-07-27 20:00:39 | 2024-07-04 00:59:58 |
Judging History
answer
// ↘ ⬇ ⬇ ⬇ ⬇ ⬇ ↙
// ➡ @roadfromroi ⬅
// ↗ ⬆ ⬆ ⬆ ⬆ ⬆ ↖
#include <iostream>
#include "vector"
#include "algorithm"
#include "numeric"
#include "climits"
#include "iomanip"
#include "bitset"
#include "cmath"
#include "map"
#include "deque"
#include "array"
#include "set"
#include "vision.h"
#include "random"
#define all(x) x.begin(), x.end()
using namespace std;
vector<int> getka(int n, int m) {
int res = 0;
vector<int> capa(n + m + 1);
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
vector<int> beb(n + m + 1);
for (int i1 = i; i1 < n; ++i1) {
for (int j1 = j+1; j1 < m; ++j1) {
if (beb[abs(i-i1) + abs(j-j1)] == 0) {
capa[abs(i - i1) + abs(j - j1)]++;
beb[abs(i-i1) + abs(j-j1)] = 1;
}
}
}
}
}
return capa;
}
int cn1, cn2;
int my_and(vector<int> a) {
cn2 += a.size();
cn1 += 1;
return add_and(a);
}
int my_or(vector<int> &a) {
cn2 += a.size();
cn1 += 1;
return add_or(a);
}
mt19937 rnd;
vector<int> toans;
vector<vector<int>> druz;
void genshin(int H, int W, int prob) {
vector<int> op1, op2;
vector<int> typp(H * W, 2);
for (int i = 0; i < H * W; ++i) {
if (rnd() % prob == 0) {
typp[i] = 1;
op1.push_back(i);
}
}
for (int i = 0; i < H * W; ++i) {
if (typp[i] == 1) {
for (auto j : druz[i]) {
if (typp[j] == 2)
typp[j] = 0;
}
}
}
//if (typp[0] + typp[1] == 3)
// cout << "DA\n";
for (int i = 0; i < H * W; ++i) {
if (typp[i] == 2) {
op2.push_back(i);
}
}
if (op1.empty() or op2.empty())
return;
int x = my_or(op1);
int y = my_or(op2);
int res = my_and(vector<int>{x, y});
toans.push_back(res);
}
void construct_network(int H, int W, int K) {
druz.assign(H * W, {});
for (int i = 0; i < H; ++i) {
for (int j = 0; j < W; ++j) {
for (int i1 = 0; i1 < H; ++i1) {
for (int j1 = 0; j1 < W; ++j1) {
if (abs(i - i1) + abs(j - j1) == K) {
druz[i * W + j].push_back(i1 * W + j1);
}
}
}
}
}
toans.clear();
cn1 = 0;cn2 = 0;
int ctry = 0;
while (cn2 + toans.size() < 960000 and cn1 < 9990 and ctry * H * W < 1e5) {
genshin(H, W, K + 5);
ctry++;
}
if (toans.empty()) {
vector<int> t;
for (int i = 0; i < H * W; ++i) {
t.push_back(i);
}
int beba = my_or(t);
} else {
int beba = my_or(toans);
beba = add_not(beba);
}
//cout << toans.size() << ' ' << cn1 << ' ' << cn2 << endl;
}
//#define LOCAL
#ifdef LOCAL
static const int MAX_INSTRUCTIONS = 10000;
static const int MAX_INPUTS = 1000000;
static const int _AND = 0;
static const int _OR = 1;
static const int _XOR = 2;
static const int _NOT = 3;
static inline bool increasing(int a, int b, int c) {
return a <= b && b <= c;
}
[[noreturn]] static inline void error(string message) {
printf("%s\n", message.c_str());
exit(0);
}
class InstructionNetwork {
struct Instruction {
int type;
vector<int> input_indexes;
inline Instruction(int _type, const vector<int>& _input_indexes):
type(_type), input_indexes(_input_indexes) {
}
inline int apply(int a, int b) const {
switch (type) {
case _AND:
return a & b;
case _OR:
return a | b;
case _XOR:
return a ^ b;
default:
return 0;
}
}
inline int compute(const vector<int>& memory_cells) const {
int r = memory_cells[input_indexes[0]];
if (type == _NOT)
return 1 - r;
for (int j = 1; j < (int)input_indexes.size(); j++)
r = apply(r, memory_cells[input_indexes[j]]);
return r;
}
};
int input_size;
int total_inputs;
vector<Instruction> instructions;
public:
inline void init(int _input_size) {
this->input_size = _input_size;
this->total_inputs = 0;
this->instructions.clear();
}
inline int add_instruction(int type, const vector<int>& input_indexes) {
if (input_indexes.size() == 0)
error("Instruction with no inputs");
if (instructions.size() + 1 > MAX_INSTRUCTIONS)
error("Too many instructions");
if (total_inputs + input_indexes.size() > MAX_INPUTS)
error("Too many inputs");
instructions.emplace_back(type, input_indexes);
total_inputs += input_indexes.size();
int new_index = input_size + (int)instructions.size() - 1;
for (int input_index : input_indexes)
if (!increasing(0, input_index, new_index-1))
error("Invalid index");
return new_index;
}
inline int compute(vector<int> &memory_cells) const {
for (auto &instruction : instructions)
memory_cells.push_back(instruction.compute(memory_cells));
return memory_cells.back();
}
};
static InstructionNetwork instructionNetwork;
int main() {
int H, W, K;
assert(3 == scanf("%d%d%d", &H, &W, &K));
FILE *log_file = fopen("log.txt","w");
instructionNetwork.init(H * W);
construct_network(H, W, K);
while (true) {
int rowA, colA, rowB, colB;
assert(1 == scanf("%d", &rowA));
if (rowA == -1)
break;
assert(3 == scanf("%d%d%d", &colA, &rowB, &colB));
if ((!increasing(0, rowA, H-1)) ||
(!increasing(0, colA, W-1)) ||
(!increasing(0, rowB, H-1)) ||
(!increasing(0, colB, W-1)) ||
(rowA == rowB && colA == colB)) {
printf("-1\n");
fprintf(log_file, "-1\n");
fflush(stdout);
fflush(log_file);
continue;
}
vector<int> memory_cells;
for (int row = 0; row < H; row++)
for (int col = 0; col < W; col++) {
bool active = (row == rowA && col == colA) || (row == rowB && col == colB);
memory_cells.push_back(active ? 1 : 0);
}
int computation_result = instructionNetwork.compute(memory_cells);
printf("%d\n", computation_result);
fflush(stdout);
for(int i = 0; i < (int)memory_cells.size(); i++)
fprintf(log_file, (i ? " %d" : "%d"), memory_cells[i]);
fprintf(log_file, "\n");
fflush(log_file);
}
fclose(stdin);
}
int add_and(vector<int> Ns) {
return instructionNetwork.add_instruction(_AND, Ns);
}
int add_or(vector<int> Ns) {
return instructionNetwork.add_instruction(_OR, Ns);
}
int add_xor(vector<int> Ns) {
return instructionNetwork.add_instruction(_XOR, Ns);
}
int add_not(int N) {
vector<int> Ns = {N};
return instructionNetwork.add_instruction(_NOT, Ns);
}
#endif
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 2ms
memory: 4056kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 3 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 2 1 1 0 0 2 3 4 1 1 0 1 1 2 0 2 6 7 1 1 0 1 1 2 0 2 9 10 1 1 0 1 1 2 0 2 12 13 1 1 0 1 1 2 0 2 15 16 1 1 2 1 1 0 0 2 18 19 1 1 0 1 1 2 0 2 21 22 1 1 2 1 1 0 0 2 24 25 1 1 2 1 1 0 0 2 27 28 1 1 2 1 1 0 0 2 30 31 1 1 0 1 1 2 0 2 33 34 1 1 2 1 1 0 0 2 36...
result:
ok
Test #2:
score: 10
Accepted
time: 0ms
memory: 4124kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 3 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 2 0 2 0 2 3 4 1 1 2 1 1 1 0 2 6 7 1 1 1 1 2 0 2 0 2 9 10 1 1 0 1 1 1 0 2 12 13 1 1 1 1 2 0 2 0 2 15 16 1 1 1 1 2 0 2 0 2 18 19 1 1 0 1 1 1 0 2 21 22 1 1 1 1 2 0 2 0 2 24 25 1 1 2 1 1 1 0 2 27 28 1 1 1 1 2 0 2 0 2 30 31 1 1 1 1 2 0 2 0 2 33 34 1 1 ...
result:
ok
Test #3:
score: 10
Accepted
time: 4ms
memory: 4068kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 1 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 2 1 1 0 0 2 3 4 1 1 0 1 1 2 0 2 6 7 1 1 0 1 1 2 0 2 9 10 1 1 0 1 1 2 0 2 12 13 1 1 0 1 1 2 0 2 15 16 1 1 2 1 1 0 0 2 18 19 1 1 0 1 1 2 0 2 21 22 1 1 2 1 1 0 0 2 24 25 1 1 2 1 1 0 0 2 27 28 1 1 2 1 1 0 0 2 30 31 1 1 0 1 1 2 0 2 33 34 1 1 2 1 1 0 0 2 36...
result:
ok
Test #4:
score: 10
Accepted
time: 4ms
memory: 4180kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 1 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 2 0 2 0 2 3 4 1 1 2 1 1 1 0 2 6 7 1 1 1 1 2 0 2 0 2 9 10 1 1 0 1 1 1 0 2 12 13 1 1 1 1 2 0 2 0 2 15 16 1 1 1 1 2 0 2 0 2 18 19 1 1 0 1 1 1 0 2 21 22 1 1 1 1 2 0 2 0 2 24 25 1 1 2 1 1 1 0 2 27 28 1 1 1 1 2 0 2 0 2 30 31 1 1 1 1 2 0 2 0 2 33 34 1 1 ...
result:
ok
Test #5:
score: 10
Accepted
time: 2ms
memory: 4132kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 2 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 1 2 0 2 4 5 1 1 0 1 1 3 0 2 7 8 1 1 0 1 1 3 0 2 10 11 1 1 2 1 1 1 0 2 13 14 1 1 2 1 1 1 0 2 16 17 1 1 3 1 1 0 0 2 19 20 1 1 1 1 1 2 0 2 22 23 1 1 0 1 1 3 0 2 25 26 1 1 3 1 1 0 0 2 28 29 1 1 0 1 1 3 0 2 31 32 1 1 1 1 1 2 0 2 34 35 1 1 1 1 1 2 0 2 3...
result:
ok
Test #6:
score: 10
Accepted
time: 2ms
memory: 4136kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 2 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 2 0 3 0 2 4 5 1 1 0 1 2 1 2 0 2 7 8 1 1 1 1 2 0 3 0 2 10 11 1 1 3 1 2 1 2 0 2 13 14 1 1 0 1 2 1 2 0 2 16 17 1 1 0 1 2 1 2 0 2 19 20 1 1 3 1 2 1 2 0 2 22 23 1 1 0 1 2 1 2 0 2 25 26 1 1 0 1 2 1 2 0 2 28 29 1 1 3 1 2 1 2 0 2 31 32 1 1 2 1 2 0 3 0 2 3...
result:
ok
Test #7:
score: 10
Accepted
time: 4ms
memory: 4088kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 3 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 2 3 5 0 2 6 7 1 1 2 1 3 0 3 4 0 2 9 10 1 3 0 1 3 1 1 5 0 2 12 13 1 1 0 1 3 2 4 5 0 2 15 16 1 2 0 4 1 1 2 0 2 18 19 1 2 1 3 1 1 5 0 2 21 22 1 1 5 1 3 0 1 3 0 2 24 25 1 2 0 1 1 1 5 0 2 27 28 1 2 4 5 1 1 0 0 2 30 31 1 1 1 1 2 3 5 0 2 33 34 1 1 4 1 2 ...
result:
ok
Test #8:
score: 10
Accepted
time: 2ms
memory: 4368kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 3 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 3 0 2 4 0 2 6 7 1 1 2 1 3 1 3 5 0 2 9 10 1 2 1 3 1 3 0 2 4 0 2 12 13 1 1 1 1 3 0 2 4 0 2 15 16 1 1 1 1 3 0 2 4 0 2 18 19 1 2 0 4 1 3 1 3 5 0 2 21 22 1 1 5 1 3 0 2 4 0 2 24 25 1 1 4 1 3 1 3 5 0 2 27 28 1 1 4 1 3 1 3 5 0 2 30 31 1 1 3 1 3 0 2 4 0 2 ...
result:
ok
Test #9:
score: 10
Accepted
time: 5ms
memory: 4356kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 3 3 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 3 1 4 0 1 4 5 0 2 6 7 1 1 2 1 4 0 1 4 5 0 2 9 10 1 1 3 1 4 0 1 4 5 0 2 12 13 1 1 1 1 5 0 2 3 4 5 0 2 15 16 1 2 3 4 1 3 0 1 5 0 2 18 19 1 1 5 1 4 1 2 3 4 0 2 21 22 1 1 1 1 5 0 2 3 4 5 0 2 24 25 1 1 4 1 5 0 1 2 3 5 0 2 27 28 1 1 5 1 4 1 2 3 4 0 2 30 31 ...
result:
ok
Test #10:
score: 10
Accepted
time: 5ms
memory: 4116kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 2 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 3 2 4 5 0 2 6 7 1 1 2 1 2 1 5 0 2 9 10 1 3 0 1 3 1 1 4 0 2 12 13 1 1 0 1 3 3 4 5 0 2 15 16 1 2 0 4 1 1 3 0 2 18 19 1 3 3 4 5 1 1 0 0 2 21 22 1 2 1 3 1 1 4 0 2 24 25 1 1 5 1 3 0 1 2 0 2 27 28 1 2 0 1 1 2 4 5 0 2 30 31 1 2 4 5 1 2 0 1 0 2 33 34 1 1 ...
result:
ok
Test #11:
score: 10
Accepted
time: 4ms
memory: 4280kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 2 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 3 0 3 4 0 2 6 7 1 1 2 1 3 0 3 4 0 2 9 10 1 1 1 1 3 0 3 4 0 2 12 13 1 1 1 1 3 0 3 4 0 2 15 16 1 2 0 4 1 3 1 2 5 0 2 18 19 1 1 5 1 3 0 3 4 0 2 21 22 1 1 4 1 3 1 2 5 0 2 24 25 1 1 4 1 3 1 2 5 0 2 27 28 1 1 3 1 3 1 2 5 0 2 30 31 1 1 2 1 3 0 3 4 0 2 33...
result:
ok
Test #12:
score: 10
Accepted
time: 2ms
memory: 4120kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 2 3 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 3 1 5 0 1 2 4 5 0 2 6 7 1 1 2 1 5 0 1 3 4 5 0 2 9 10 1 1 3 1 5 0 1 2 4 5 0 2 12 13 1 1 1 1 4 0 2 3 5 0 2 15 16 1 2 3 4 1 3 0 2 5 0 2 18 19 1 1 5 1 4 1 2 3 4 0 2 21 22 1 1 1 1 4 0 2 3 5 0 2 24 25 1 1 4 1 4 0 2 3 5 0 2 27 28 1 1 5 1 4 1 2 3 4 0 2 30 31 ...
result:
ok
Test #13:
score: 10
Accepted
time: 5ms
memory: 4356kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 3 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 2 1 8 1 2 3 6 0 2 9 10 1 3 3 4 6 1 2 2 8 0 2 12 13 1 1 6 1 6 0 1 2 4 5 8 0 2 15 16 1 2 3 7 1 3 1 2 5 0 2 18 19 1 2 0 8 1 3 2 4 6 0 2 21 22 1 2 0 1 1 4 5 6 7 8 0 2 24 25 1 3 1 2 4 1 2 6 8 0 2 27 28 1 1 7 1 5 0 1 2 3 5 0 2 30 31 1 3 5 7 8 1 3 0 1 3 0 2 33...
result:
ok
Test #14:
score: 10
Accepted
time: 5ms
memory: 4088kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 3 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 2 1 8 1 1 0 0 2 9 10 1 2 4 6 1 4 1 3 5 7 0 2 12 13 1 1 7 1 5 0 2 4 6 8 0 2 15 16 1 1 4 1 4 1 3 5 7 0 2 18 19 1 2 0 4 1 4 1 3 5 7 0 2 21 22 1 2 2 7 1 1 6 0 2 24 25 1 1 1 1 5 0 2 4 6 8 0 2 27 28 1 2 3 8 1 1 0 0 2 30 31 1 2 3 5 1 5 0 2 4 6 8 0 2 33 34 1 2 ...
result:
ok
Test #15:
score: 10
Accepted
time: 5ms
memory: 4076kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 3 3 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 6 1 6 0 2 3 4 7 8 0 2 9 10 1 1 8 1 6 0 2 4 5 6 7 0 2 12 13 1 2 3 7 1 4 1 4 5 6 0 2 15 16 1 2 0 1 1 3 2 3 4 0 2 18 19 1 2 5 7 1 4 1 3 4 8 0 2 21 22 1 1 7 1 6 1 3 4 5 6 8 0 2 24 25 1 2 5 8 1 3 2 4 7 0 2 27 28 1 2 0 8 1 3 2 4 6 0 2 30 31 1 4 2 5 7 8 1 1 ...
result:
ok
Test #16:
score: 10
Accepted
time: 5ms
memory: 4152kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 3 3 4 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 7 1 8 0 1 2 3 4 5 6 8 0 2 9 10 1 1 3 1 8 0 1 2 4 5 6 7 8 0 2 12 13 1 2 2 5 1 6 0 1 3 4 7 8 0 2 15 16 1 1 7 1 8 0 1 2 3 4 5 6 8 0 2 18 19 1 2 3 4 1 7 0 1 2 5 6 7 8 0 2 21 22 1 2 0 6 1 5 1 3 4 5 7 0 2 24 25 1 3 5 7 8 1 5 1 2 3 4 6 0 2 27 28 1 3 3 7 8 1 ...
result:
ok
Test #17:
score: 10
Accepted
time: 0ms
memory: 3780kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 2 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 1 1 2 0 1
result:
ok
Test #18:
score: 10
Accepted
time: 3ms
memory: 3980kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 1 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 1 1 2 0 1
result:
ok
Subtask #2:
score: 11
Accepted
Test #19:
score: 11
Accepted
time: 2ms
memory: 4148kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 9 3 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 6 1 7 0 1 2 4 5 7 8 0 2 9 10 1 1 8 1 7 0 1 2 3 4 6 7 0 2 12 13 1 2 3 7 1 4 1 2 5 8 0 2 15 16 1 2 0 1 1 5 2 5 6 7 8 0 2 18 19 1 2 5 7 1 4 0 1 3 6 0 2 21 22 1 1 7 1 7 0 1 2 3 5 6 8 0 2 24 25 1 2 5 8 1 6 0 1 3 4 6 7 0 2 27 28 1 2 0 8 1 5 1 2 4 6 7 0 2 30...
result:
ok
Test #20:
score: 11
Accepted
time: 5ms
memory: 4116kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 9 1 5 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 2 3 6 1 5 0 2 4 5 7 0 2 9 10 1 1 1 1 7 0 2 3 4 5 7 8 0 2 12 13 1 1 7 1 7 0 1 3 4 5 6 8 0 2 15 16 1 1 7 1 7 0 1 3 4 5 6 8 0 2 18 19 1 1 2 1 7 0 1 3 4 5 6 8 0 2 21 22 1 1 5 1 7 1 2 3 4 6 7 8 0 2 24 25 1 2 2 7 1 7 0 1 3 4 5 6 8 0 2 27 28 1 1 8 1 7 0 1 2 4 ...
result:
ok
Test #21:
score: 11
Accepted
time: 6ms
memory: 4100kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 10 5 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5996 1 9 1 8 13 15 25 31 36 40 47 1 12 0 10 16 20 22 24 28 29 34 39 44 48 0 2 50 51 1 12 2 8 9 14 25 30 31 33 36 43 45 49 1 11 1 5 10 11 16 17 22 28 34 44 48 0 2 53 54 1 6 6 9 27 32 37 47 1 13 1 4 5 11 14 15 18 20 24 40 44 46 48 0 2 56 57 1 8 5 6 13 17 20 21 3...
result:
ok
Test #22:
score: 11
Accepted
time: 7ms
memory: 4272kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 5 10 12 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5681 1 6 1 12 19 20 32 37 1 42 0 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 21 22 23 24 25 26 27 28 29 30 31 33 34 35 36 38 39 41 42 43 44 45 46 47 48 0 2 50 51 1 4 19 26 33 41 1 44 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 27 28 29 30 31 32 ...
result:
ok
Test #23:
score: 11
Accepted
time: 3ms
memory: 4332kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 10 10 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3002 1 21 1 8 12 13 15 24 30 34 39 40 41 43 45 53 54 55 64 65 67 88 99 1 41 4 6 10 17 19 21 26 27 28 32 36 37 47 48 58 59 60 61 62 69 70 71 72 73 76 79 80 81 82 83 84 85 86 90 91 92 93 94 95 96 97 0 2 100 101 1 17 4 5 7 13 15 16 19 20 33 40 43 45 53 54 69 82 9...
result:
ok
Test #24:
score: 11
Accepted
time: 5ms
memory: 3976kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 10 10 5 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 2999 1 10 12 15 28 43 52 65 77 83 88 98 1 31 0 3 7 8 16 18 19 22 25 30 31 39 41 50 58 61 64 68 70 73 76 81 85 86 87 89 90 92 95 96 99 0 2 100 101 1 11 5 19 31 32 37 43 45 77 82 85 87 1 24 1 7 8 10 12 16 18 21 24 29 30 34 42 52 56 61 67 74 88 89 90 92 97 98 0 2...
result:
ok
Test #25:
score: 11
Accepted
time: 0ms
memory: 4028kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 10 10 9 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3002 1 17 1 8 13 15 25 40 47 52 58 59 64 75 80 83 86 95 99 1 15 0 24 33 35 42 44 51 53 57 62 66 68 74 77 84 0 2 100 101 1 6 32 37 47 63 71 82 1 61 4 5 7 9 12 13 15 16 18 21 22 23 24 26 27 29 30 31 33 34 35 38 40 41 42 43 44 45 46 48 49 51 52 53 54 55 56 57 62 ...
result:
ok
Test #26:
score: 11
Accepted
time: 3ms
memory: 4296kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 10 10 14 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 2996 1 7 31 36 37 79 80 89 92 1 78 0 1 4 5 8 9 10 13 14 15 16 19 22 23 24 25 26 27 32 33 34 35 38 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 81 82 83 84 85 86 87 88 90 91 93 94 95 96 97 ...
result:
ok
Test #27:
score: 11
Accepted
time: 7ms
memory: 4404kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 10 10 18 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 2990 1 1 33 1 99 0 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 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 8...
result:
ok
Subtask #3:
score: 0
Wrong Answer
Dependency #2:
100%
Accepted
Test #28:
score: 0
Wrong Answer
time: 4ms
memory: 4056kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 30 30 15 100 198 292 896 132 11 161 406 319 701 460 596 369 959 191 730 128 923 590 1006 31 451 230 575 143 515 149 571 73 554 699 559 302 658 455 1017 252 283 137 380 159 965 260 639 46 527 332 968 57 457 439 686 320 339 157 358 696 620 727 1022 623 949 35 609 7...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 338 1 51 12 15 28 43 52 77 83 88 98 105 119 132 143 177 182 205 228 233 253 255 258 262 268 289 293 310 326 403 405 444 447 462 465 469 475 479 489 527 532 559 600 627 694 715 725 747 760 807 818 851 872 1 153 2 7 9 14 18 24 36 38 47 49 60 65 67 72 76 78 80 86...
result:
wrong answer on inputs (2, 6), (20, 9), expected 0, but computed 1
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Wrong Answer
Test #48:
score: 12
Accepted
time: 3ms
memory: 4376kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 1511 1 38 1 8 12 13 15 24 30 34 39 40 41 43 45 53 54 55 64 65 67 88 99 104 105 107 113 115 116 119 120 133 140 143 145 153 154 169 182 194 1 112 3 4 5 6 10 17 18 19 20 21 22 26 27 28 32 36 37 47 48 49 50 51 57 58 59 60 61 62 69 70 71 72 73 74 75 76 77 78 79 80...
result:
ok
Test #49:
score: 0
Wrong Answer
time: 6ms
memory: 4256kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 99 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 1247 1 2 18 34 1 195 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 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 ...
result:
wrong answer on inputs (0, 8), (0, 39), expected 0, but computed 1
Subtask #6:
score: 0
Wrong Answer
Test #70:
score: 8
Accepted
time: 4ms
memory: 4132kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 2 1 3 128 128 129 128 130 128 131
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 1 2 0 2 4 5 1 1 0 1 1 3 0 2 7 8 1 1 0 1 1 3 0 2 10 11 1 1 2 1 1 1 0 2 13 14 1 1 2 1 1 1 0 2 16 17 1 1 3 1 1 0 0 2 19 20 1 1 1 1 1 2 0 2 22 23 1 1 0 1 1 3 0 2 25 26 1 1 3 1 1 0 0 2 28 29 1 1 0 1 1 3 0 2 31 32 1 1 1 1 1 2 0 2 34 35 1 1 1 1 1 2 0 2 3...
result:
ok
Test #71:
score: 8
Accepted
time: 4ms
memory: 4084kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 2 2 3 129 129 128 129 131 129 130
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 9992 1 1 1 1 2 0 3 0 2 4 5 1 1 0 1 2 1 2 0 2 7 8 1 1 1 1 2 0 3 0 2 10 11 1 1 3 1 2 1 2 0 2 13 14 1 1 0 1 2 1 2 0 2 16 17 1 1 0 1 2 1 2 0 2 19 20 1 1 3 1 2 1 2 0 2 22 23 1 1 0 1 2 1 2 0 2 25 26 1 1 0 1 2 1 2 0 2 28 29 1 1 3 1 2 1 2 0 2 31 32 1 1 2 1 2 0 3 0 2 3...
result:
ok
Test #72:
score: 8
Accepted
time: 10ms
memory: 4228kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 1 8 254 254 255 254 227 254 252 254 196 254 224 254 2958 254 2986 254 226
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 107 1 486 1 8 12 13 15 24 30 34 39 40 41 43 45 53 54 55 64 65 67 88 99 104 105 107 113 115 116 119 120 133 140 143 145 153 154 169 182 194 201 203 205 211 214 216 239 244 248 257 262 273 276 281 287 291 293 300 301 310 313 316 318 327 330 331 345 349 355 364 3...
result:
ok
Test #73:
score: 0
Wrong Answer
time: 9ms
memory: 4692kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 31 92 284 284 330 284 634 284 598 284 114 284 366 284 966 284 814 284 922 284 510 284 474 284 194 284 930 284 42 284 230 284 1002 284 438 284 526 284 778 284 186 284 6 284 958 284 150 284 562 284 886 284 78 284 402 284 850 284 482 284 222 284 367 284 671 2...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 107 1 100 39 88 99 105 113 115 116 143 182 239 257 262 273 281 313 316 331 366 376 387 462 494 519 532 585 594 725 747 760 763 793 822 896 937 961 987 1049 1058 1068 1097 1148 1152 1161 1167 1238 1314 1344 1360 1383 1422 1470 1478 1519 1535 1561 1644 1680 1703...
result:
wrong answer on inputs (0, 0), (2, 28), expected 0, but computed 1
Subtask #7:
score: 0
Wrong Answer
Test #101:
score: 0
Wrong Answer
time: 986ms
memory: 6084kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 200 200 1 100 524 24804 34853 20956 34628 18830 29184 28919 32573 11364 24911 2226 5624 3715 30838 2206 17143 21162 27531 20198 27242 5007 12724 27160 32586 3535 7307 17015 25466 626 13891 9132 26194 9198 33073 815 7328 6938 21395 9489 30995 10804 21530 14698 394...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 11 1 6619 1 8 12 13 15 24 30 34 39 40 41 43 45 53 54 55 64 65 67 88 99 104 105 107 113 115 116 119 120 133 140 143 145 153 154 169 182 194 201 203 205 211 214 216 239 244 248 257 262 273 276 281 287 291 293 300 301 310 313 316 318 327 330 331 345 349 355 364 3...
result:
wrong answer on inputs (126, 120), (176, 169), expected 0, but computed 1
Subtask #8:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%