QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#128447 | #2760. Simurgh | somethingnew# | 13 | 12ms | 4120kb | C++20 | 8.5kb | 2023-07-21 05:22:00 | 2024-07-04 00:49:59 |
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 "simurgh.h"
#define all(x) x.begin(), x.end()
using namespace std;
struct dsu {
vector<int> p;
dsu(int n) {
p.assign(n, {});
for (int i = 0; i < n; ++i) {
p[i] = i;
}
}
int getv(int v) {
if (p[v] == v)
return v;
return p[v] = getv(p[v]);
}
bool merge(int a, int b) {
a = getv(a);
b = getv(b);
if (a == b)
return 0;
p[a] = b;
return 1;
}
};
vector<array<int, 3>> bb;
vector<int> banned;
vector<int> inba(int n) {
dsu usd(n);
vector<int> vec;
for (int i = 0; i < bb.size(); ++i) {
if (!banned[i] and usd.merge(bb[i][0], bb[i][1])) {
vec.push_back(i);
}
}
return vec;
}
vector<int> getel(int n, vector<int> ind) {
dsu usd(n);
vector<int> vec;
for (auto i : ind) {
if (usd.merge(bb[i][0], bb[i][1])) {
vec.push_back(i);
}
}
return vec;
}
bool chk(int n, int v, vector<int> indexes) {
dsu usd(n);
int rb = 1;
for (auto i : indexes) {
if (v != i)
rb += usd.merge(bb[i][0], bb[i][1]);
if (rb == n)
return 1;
}
return 0;
}
int countpls1(vector<int> r, int a) {
r.push_back(a);
return count_common_roads(r);
}
int weightedask(vector<int> a) {
//cout << "DD" << endl;
int res = 0;
for (auto i : a) {
if (bb[i][2] != -1)
res -= bb[i][2];
}
int vl = res + count_common_roads(a);
//cout << "EE" << endl;
return vl;
}
int cmp(int n, int a, int b, vector<int> indexes) {
dsu usd(n);
int vv;
if (bb[a][0] == bb[b][0] or bb[a][0] == bb[b][1]) {
vv = bb[a][0];
} else {
vv = bb[a][1];
}
int rb = 1;
vector<int> tocmp;
//cout << rb << ' ' << a << ' ' << b << endl;
for (auto i : indexes) {
//cout << i << endl;
if (bb[i][0] != vv and bb[i][1] != vv and usd.merge(bb[i][0], bb[i][1])) {
rb += 1;
tocmp.push_back(i);
}
}
if (rb != n - 1)
return -10;
//cout << vv << endl;
//cout << a << endl;
int vl1 = countpls1(tocmp, a);
//cout << b << endl;
int vl2 = countpls1(tocmp, b);
// cout << a << ' ' << vl1 << ' ' << b << ' ' << vl2 << endl;
return vl2 - vl1;
}
struct dsutype {
vector<int> p;
vector<int> tp;
dsutype(int n, vector<int> tps) {
p.assign(n, {});
tp = tps;
for (int i = 0; i < n; ++i) {
p[i] = i;
}
}
int getv(int v) {
if (p[v] == v)
return v;
return p[v] = getv(p[v]);
}
bool merge(int n, int a, int b, vector<int> &indexes) {
int aorig = a, borig = b;
a = getv(a);
b = getv(b);
if (tp[a] == -1 or tp[b] == -1) {
int vl = max(tp[a], tp[b]);
int quer = cmp(n, aorig, borig, indexes);
if (quer == -10)
return 0;
if (quer == 0) {
p[b] = a;
tp[a] = vl;
}
if (quer == 1) {
tp[b] = 1;
tp[a] = 0;
}
if (quer == -1) {
tp[b] = 0;
tp[a] = 1;
}
return 1;
}
return 0;
}
};
int zprsmart(int n, vector<int> addp, vector<int> knw) {
//cout << "ZPSt\n";
dsu usd(n);
vector<int> tocmp;
for (auto i : addp) {
tocmp.push_back(i);
if (!usd.merge(bb[i][0], bb[i][1]))
exit(1);
}
for (auto i : knw) {
if (usd.merge(bb[i][0], bb[i][1]))
tocmp.push_back(i);
}
int vl = weightedask(tocmp);
//cout << "ZPend\n";
return vl;
}
std::vector<int> find_roads(int n, vector<int> u, vector<int> v) {
bb.assign(u.size(), {});
for (int i = 0; i < u.size(); ++i) {
bb[i] = {u[i], v[i], -1};
}
banned.assign(u.size(), 0);
vector<int> maybe(u.size());
for (int i = 0; i < u.size(); ++i) {
maybe[i] = i;
}
/*vector<int> maybe = inba(n);
for (auto i : maybe)
banned[i] = 1;
vector<int> maybe2 = inba(n);
for (auto i : maybe2) {
//cerr << i << endl;
maybe.push_back(i);
}*/
vector<int> tpp;
for (auto i : maybe) {
if (!chk(n, i, maybe)) {
bb[i][2] = 1;
tpp.push_back(1);
} else {
tpp.push_back(-1);
}
}
dsutype usd(tpp.size(), tpp);
for (auto i : maybe) {
for (auto j : maybe) {
if (i == j)
break;
if (bb[i][0] == bb[j][0] or bb[i][0] == bb[j][1] or bb[i][1] == bb[j][0] or bb[i][1] == bb[j][1]) {
//cout << i << ' ' << j << endl;
usd.merge(n, i, j, maybe);
}
}
}
vector<int> knowres2, knowres;
for (auto i : maybe) {
if (usd.tp[usd.getv(i)] != -1) {
bb[i][2] = usd.tp[usd.getv(i)];
knowres2.push_back(i);
}
}
knowres = getel(n, knowres2);
if (knowres.size() != n - 1)
exit(2);
vector<vector<int>> g(n);
for (int i = 0; i < v.size(); ++i) {
g[v[i]].push_back(i);
g[u[i]].push_back(i);
}
for (int i = 0; i < n; ++i) {
vector<int> clred;
for (auto j : g[i]) {
if (bb[j][2] == -1)
clred.push_back(j);
}
int fr = -1;
while (fr != clred.size()) {
int l = fr, r = clred.size();
while (l + 1 < r) {
int m = l + r >> 1;
vector<int> tepa;
for (int j = fr+1; j <= m; ++j) {
tepa.push_back(clred[j]);
}
if (zprsmart(n, tepa, knowres)) {
r = m;
} else {
l = m;
}
}
fr = r;
if (fr != clred.size()) {
bb[clred[fr]][2] = 1;
}
}
for (auto j : clred) {
if (bb[j][2] == -1)
bb[j][2] = 0;
}
}
//cout << "DAAA" << endl;
vector<int> resba;
for (int i = 0; i < bb.size(); ++i) {
if (bb[i][2] == 1)
resba.push_back(i);
}
return resba;
}
/*
static int MAXQ = 30000;
static int n, m, q = 0;
static vector<int> u, v;
static vector<bool> goal;
static void wrong_answer() {
printf("NO\n");
exit(0);
}
static bool is_valid(const vector<int>& r) {
if(int(r.size()) != n - 1)
return false;
for(int i = 0; i < n - 1; i++)
if (r[i] < 0 || r[i] >= m)
return false;
return true;
}
static int _count_common_roads_internal(const vector<int>& r) {
dsu usd(n);
if(!is_valid(r)) {
cout << "invalid query\n";
for (auto i : r)
cout << i << ' ';
cout << endl;
wrong_answer();
}
int rb = 1;
for (auto i : r) {
rb += usd.merge(u[i], v[i]);
}
if (rb != n) {
cout << "invalid query\n";
for (auto i : r)
cout << i << ' ';
cout << endl;
wrong_answer();
}
int common = 0;
for(int i = 0; i < n - 1; i++) {
bool is_common = goal[r[i]];
if (is_common)
common++;
}
return common;
}
int count_common_roads(const vector<int>& r) {
q++;
if(q > MAXQ)
wrong_answer();
return _count_common_roads_internal(r);
}
int main() {
assert(2 == scanf("%d %d", &n, &m));
u.resize(m);
v.resize(m);
for(int i = 0; i < m; i++)
assert(2 == scanf("%d %d", &u[i], &v[i]));
goal.resize(m, false);
for(int i = 0; i < n - 1; i++) {
int id;
assert(1 == scanf("%d", &id));
goal[id] = true;
}
vector<int> res = find_roads(n, u, v);
if(_count_common_roads_internal(res) != n - 1)
wrong_answer();
printf("YES\n");
return 0;
}
*/
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 13
Accepted
Test #1:
score: 13
Accepted
time: 1ms
memory: 3780kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 21 30000 2 0 0 1 5 2 2 6 1 3 3 0 6 0 4 5 3 2 4 0 1 4 0 5 4 3 4 6 6 1 2 1 5 3 2 4 5 6 5 1 6 3 7 10 9 13 12 17
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 7 9 10 12 13 17
result:
ok correct
Test #2:
score: 13
Accepted
time: 1ms
memory: 3748kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 21 30000 4 6 1 6 2 3 0 3 2 1 2 6 5 6 6 3 0 2 1 0 4 2 1 3 5 2 5 0 0 6 5 3 4 5 5 1 3 4 1 4 4 0 4 16 10 0 20 18
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 4 10 16 18 20
result:
ok correct
Test #3:
score: 13
Accepted
time: 1ms
memory: 3748kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 21 30000 2 5 0 4 4 5 4 3 5 3 1 3 3 6 4 1 6 0 5 6 6 2 6 1 6 4 3 2 2 1 1 0 0 2 5 0 5 1 4 2 0 3 20 17 15 9 2 19
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 2 9 15 17 19 20
result:
ok correct
Test #4:
score: 13
Accepted
time: 1ms
memory: 3788kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 13 30000 2 4 4 3 3 2 0 3 0 4 6 3 6 1 4 5 6 2 1 3 5 6 6 0 6 4 3 9 12 7 0 4
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 3 4 7 9 12
result:
ok correct
Test #5:
score: 13
Accepted
time: 0ms
memory: 3724kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 6 10 30000 5 2 0 1 1 2 0 3 3 2 1 4 0 5 3 5 4 3 1 3 5 0 7 2 1
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 1 2 5 7
result:
ok correct
Test #6:
score: 13
Accepted
time: 1ms
memory: 3732kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 16 30000 3 4 2 5 2 1 0 5 1 5 0 2 2 6 6 1 4 6 0 1 2 3 6 3 3 1 1 4 4 5 3 5 0 9 5 15 3 11
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 3 5 9 11 15
result:
ok correct
Test #7:
score: 13
Accepted
time: 1ms
memory: 3728kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 2 1 30000 0 1 0
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0
result:
ok correct
Test #8:
score: 13
Accepted
time: 1ms
memory: 3796kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 3 3 30000 0 1 2 0 1 2 2 0
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 2
result:
ok correct
Test #9:
score: 13
Accepted
time: 1ms
memory: 3988kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 6 5 30000 2 4 5 4 4 0 4 1 3 4 3 1 4 0 2
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 1 2 3 4
result:
ok correct
Test #10:
score: 13
Accepted
time: 1ms
memory: 3784kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 6 14 30000 4 2 1 3 4 5 4 1 0 4 0 1 2 3 2 1 0 3 5 3 0 5 0 2 5 2 1 5 13 8 10 7 3
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 3 7 8 10 13
result:
ok correct
Test #11:
score: 13
Accepted
time: 1ms
memory: 3860kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 6 30000 3 0 3 5 4 0 5 6 0 2 1 3 3 4 1 5 0 2
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 1 2 3 4 5
result:
ok correct
Test #12:
score: 13
Accepted
time: 0ms
memory: 3732kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 6 15 30000 4 3 2 3 3 5 2 0 5 2 1 3 1 4 0 5 3 0 4 0 1 0 2 1 4 5 4 2 5 1 9 13 12 6 0
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 6 9 12 13
result:
ok correct
Test #13:
score: 13
Accepted
time: 1ms
memory: 3988kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 7 21 30000 0 2 2 5 3 4 0 3 5 4 4 2 2 1 4 6 5 3 0 1 4 0 1 6 3 6 1 3 1 5 5 0 0 6 4 1 6 5 3 2 2 6 16 3 18 17 4 6
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 3 4 6 16 17 18
result:
ok correct
Subtask #2:
score: 0
Runtime Error
Dependency #1:
100%
Accepted
Test #14:
score: 17
Accepted
time: 12ms
memory: 4072kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 1225 30000 47 4 24 48 42 13 5 42 19 17 29 31 23 48 37 25 37 43 27 22 43 30 19 44 49 37 39 14 26 46 46 35 49 15 40 19 6 31 37 1 21 0 26 45 6 4 38 36 6 8 20 4 18 24 20 35 5 29 1 19 35 49 29 20 25 10 10 36 2 22 26 11 7 9 24 3 35 38 48 41 22...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 24 61 62 119 127 166 195 212 221 257 277 299 322 333 355 377 397 440 458 478 497 503 509 552 584 591 638 679 706 746 754 760 768 770 795 848 851 860 866 880 923 1006 1033 1042 1058 1071 1107 1199 1205
result:
ok correct
Test #15:
score: 17
Accepted
time: 12ms
memory: 3832kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 1225 30000 44 29 11 44 39 16 20 31 6 3 9 27 49 27 12 0 27 1 48 49 46 12 35 36 35 11 49 13 23 20 28 26 12 1 42 37 5 15 28 32 6 10 16 7 4 43 4 31 49 34 9 14 2 46 44 30 40 17 14 29 41 18 27 44 13 3 23 40 47 24 16 3 6 26 45 18 24 42 11 10 23...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 21 48 67 88 89 95 97 151 178 181 182 196 204 228 230 256 275 279 280 294 297 315 354 420 456 472 496 497 501 552 562 577 600 607 633 649 678 701 723 769 776 849 913 933 1037 1051 1055 1173 1185
result:
ok correct
Test #16:
score: 17
Accepted
time: 11ms
memory: 4120kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 1225 30000 12 30 6 44 33 47 7 33 0 2 10 30 30 46 14 11 43 42 13 27 49 24 6 17 21 2 12 21 24 38 5 21 17 0 16 4 26 5 27 32 20 45 6 20 19 0 20 35 47 39 17 39 0 23 26 33 1 17 3 20 4 46 48 21 21 35 24 40 9 29 28 23 9 1 43 34 4 44 18 37 40 13 ...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 24 25 56 67 93 95 150 160 166 198 204 213 222 261 273 290 326 374 382 438 466 470 482 513 524 535 610 784 790 795 834 841 847 859 874 882 885 894 907 917 948 966 997 1048 1064 1068 1075 1082 1141
result:
ok correct
Test #17:
score: 17
Accepted
time: 8ms
memory: 3852kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 1002 30000 35 6 20 23 17 3 16 48 49 29 31 32 38 3 10 39 16 4 47 13 0 19 24 25 42 39 48 44 39 32 1 42 18 8 17 15 19 32 33 23 21 18 7 13 6 0 26 35 34 22 39 13 48 47 6 21 44 7 21 13 43 16 41 43 36 6 25 14 3 49 3 33 47 29 25 45 45 13 12 13 3...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 4 20 28 90 96 112 116 135 174 213 221 229 237 266 304 308 313 348 351 357 370 372 401 402 403 420 436 440 559 560 591 614 636 668 670 685 712 783 801 808 823 828 837 841 858 875 898 941 963
result:
ok correct
Test #18:
score: 17
Accepted
time: 2ms
memory: 3780kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 371 30000 20 0 5 9 13 38 4 3 12 23 20 42 43 12 27 28 1 42 23 42 14 41 39 9 2 9 10 13 14 32 18 30 6 7 32 3 39 38 12 34 33 0 10 41 32 30 15 43 13 6 2 30 20 14 36 21 17 2 0 28 24 29 19 7 25 15 10 48 21 49 31 7 2 44 7 44 28 40 38 17 33 48 18...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 14 16 18 21 24 27 35 38 45 46 62 74 82 89 93 101 102 105 121 129 131 135 139 140 152 156 193 210 212 216 224 233 234 237 238 239 257 274 277 279 290 294 300 309 314 344 349 364
result:
ok correct
Test #19:
score: 17
Accepted
time: 9ms
memory: 3872kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 1027 30000 46 5 15 29 43 39 16 32 38 5 4 22 13 4 41 5 0 41 39 6 6 8 3 13 25 6 40 25 17 40 47 0 26 15 30 11 27 31 43 45 30 17 35 37 8 27 2 38 35 19 7 12 36 31 41 21 14 25 14 35 15 17 37 2 27 46 24 39 24 29 19 10 28 1 22 35 24 41 16 46 13 ...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 5 13 31 77 83 85 112 140 142 148 158 170 173 196 198 220 230 238 313 398 406 417 487 488 497 506 521 571 583 585 607 639 645 660 670 674 816 839 885 928 974 983 986 988 994 1001 1005 1007 1021
result:
ok correct
Test #20:
score: 17
Accepted
time: 9ms
memory: 4108kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 965 30000 28 25 38 23 12 44 1 35 45 46 39 4 19 22 40 23 25 49 20 29 30 9 17 2 15 32 32 14 45 7 19 12 40 22 12 35 10 5 49 37 29 31 19 40 22 6 28 46 23 11 2 1 40 24 14 44 44 40 16 47 7 14 38 47 43 34 4 18 17 22 32 30 33 13 36 21 47 37 37 3...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 6 16 45 48 50 74 79 93 109 114 125 127 138 146 157 161 182 213 251 257 259 273 332 335 346 352 353 371 505 508 541 544 546 551 570 673 679 698 766 796 799 820 837 841 846 901 907 911 952
result:
ok correct
Test #21:
score: 17
Accepted
time: 8ms
memory: 3796kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 900 30000 25 47 5 46 35 22 46 22 15 35 37 46 27 46 29 20 0 7 7 14 8 19 28 38 11 7 9 16 28 0 38 29 30 47 23 11 26 10 3 38 30 49 28 13 45 3 7 17 42 0 30 1 48 2 47 22 18 49 26 34 12 20 40 9 12 38 46 16 24 16 40 30 31 33 45 34 16 25 14 31 4 ...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 27 32 40 46 65 78 196 211 252 256 288 291 298 300 323 351 360 404 423 428 430 433 487 498 502 524 530 533 551 557 561 566 575 590 605 645 653 699 703 704 727 745 751 763 805 816 870 877 897
result:
ok correct
Test #22:
score: 17
Accepted
time: 3ms
memory: 3788kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 701 30000 1 47 37 0 2 41 32 33 15 40 38 42 5 27 0 9 0 8 10 36 26 42 5 25 41 35 27 2 21 15 40 28 0 15 43 29 37 3 28 18 9 3 47 27 32 38 48 47 28 13 34 32 27 23 40 8 38 15 46 7 24 14 12 46 47 28 20 43 2 48 2 28 22 45 14 27 23 42 30 35 26 18...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 28 29 30 31 32 33 36 37 39 42 46 51 55 56 57 60 61 62 70 76 84 86 477
result:
ok correct
Test #23:
score: 17
Accepted
time: 5ms
memory: 3784kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 626 30000 49 25 30 31 0 3 6 11 25 10 19 13 10 49 43 31 7 19 24 28 39 31 15 7 32 30 27 41 18 23 31 13 26 40 19 41 42 30 47 28 5 4 41 24 42 27 15 45 29 14 29 37 42 6 2 42 45 13 27 32 32 20 4 29 4 21 20 24 16 44 14 12 28 6 25 37 10 22 8 48 ...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 30 31 32 34 35 37 38 39 41 43 44 46 47 49 51 52 54 56 61 66 77 91 97
result:
ok correct
Test #24:
score: 17
Accepted
time: 4ms
memory: 3848kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 601 30000 28 10 43 16 22 35 42 20 8 39 34 33 47 44 47 49 3 9 10 32 34 5 4 14 9 18 19 33 29 38 31 25 8 2 5 4 5 8 40 23 27 21 36 23 10 6 14 26 39 27 44 36 29 47 6 1 2 46 21 15 43 13 28 38 1 23 41 45 3 49 26 15 39 2 11 17 22 0 45 47 48 46 4...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 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 33 34 37 38 39 40 44 47 49 50 52 56 59 60 65 70 130
result:
ok correct
Test #25:
score: 0
Runtime Error
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 50 85 30000 33 16 22 4 21 25 32 42 13 46 7 38 18 16 38 33 44 27 19 2 3 2 30 24 0 47 49 12 20 47 17 32 23 26 45 28 35 8 31 20 40 34 25 36 25 43 5 40 11 46 24 1 49 35 30 9 17 41 33 29 11 13 28 19 9 32 6 48 11 39 15 23 16 29 31 0 6 38 27 4 3 0...
output:
Unauthorized output
result:
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Time Limit Exceeded
Test #58:
score: 19
Accepted
time: 0ms
memory: 3792kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 2 1 12000 1 0 0
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 0
result:
ok correct
Test #59:
score: 19
Accepted
time: 1ms
memory: 3800kb
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 10 45 12000 4 8 0 5 2 0 5 8 8 0 3 8 6 4 4 1 2 3 2 1 6 2 1 7 3 7 8 1 7 0 8 6 0 6 9 5 9 6 7 4 7 6 7 9 1 6 3 5 2 5 7 5 3 9 0 3 3 6 2 9 1 5 0 4 7 8 5 4 9 4 5 6 3 1 2 8 7 2 2 4 1 0 9 8 4 3 1 9 9 0 22 41 3 16 7 25 28 11 39
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs OK 3 7 11 16 22 25 28 39 41
result:
ok correct
Test #60:
score: 0
Time Limit Exceeded
input:
wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd 400 79800 12000 32 64 96 254 115 203 7 171 112 81 124 143 336 175 217 328 152 133 124 331 19 91 92 232 152 43 215 169 4 341 363 18 83 99 52 46 248 66 242 187 150 319 335 158 172 150 3 49 126 256 60 153 165 230 265 68 119 380 171 22 35 169 3...
output:
lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs WA NO
result:
Subtask #5:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%