QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#242252 | #7149. Walls | 8BQube | AC ✓ | 226ms | 58852kb | C++20 | 2.3kb | 2023-11-07 03:36:10 | 2023-11-07 03:36:10 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct Edge {
int u, v, w;
bool operator<(const Edge &rhs) const {
return w < rhs.w;
}
};
vector<Edge> E;
void add_edge(int u, int v, int w) {
E.push_back({u, v, w});
}
string s[1000];
int c[1000][1000];
struct DSU {
vector<int> f;
void init(int n) {
f.resize(n + 1);
iota(f.begin(), f.end(), 0);
}
int root(int x) {
return f[x] == x ? x : f[x] = root(f[x]);
}
bool conn(int x, int y) {
x = root(x), y = root(y);
if (x == y) return false;
f[x] = y;
return true;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m;
cin >> n >> m;
const int V = n * m * 2 + n + m;
auto mapv = [=](int x, int y, int d) {
if (d == 2) {
if (y == 0) return n * m * 2 + x;
d = 0, --y;
}
if (d == 3) {
if (x == 0) return n * m * 2 + n + y;
d = 1, --x;
}
return (x * m + y) * 2 + d;
};
for (int i = 0; i < n; ++i) cin >> s[i];
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cin >> c[i][j];
}
}
for (int i = 0; i < n; ++i) {
add_edge(mapv(i, 0, 2), V, 0);
add_edge(mapv(i, m - 1, 0), V, 0);
}
for (int i = 0; i < m; ++i) {
add_edge(mapv(0, i, 3), V, 0);
add_edge(mapv(n - 1, i, 1), V, 0);
}
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
const int p[] = {mapv(i, j, 0), mapv(i, j, 1), mapv(i, j, 2), mapv(i, j, 3)};
if (s[i][j] == '\\') {
add_edge(p[0], p[1], c[i][j]);
add_edge(p[2], p[3], c[i][j]);
add_edge(p[0], p[3], 0);
add_edge(p[2], p[1], 0);
} else {
add_edge(p[0], p[1], 0);
add_edge(p[2], p[3], 0);
add_edge(p[0], p[3], c[i][j]);
add_edge(p[2], p[1], c[i][j]);
}
}
}
sort(E.begin(), E.end());
DSU dsu;
dsu.init(V);
ll ans = 0;
for (const auto &e : E) {
if (dsu.conn(e.u, e.v)) {
ans += e.w;
}
}
cout << ans << endl;
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3660kb
input:
3 3 /\/ \/\ /\/ 1 3 3 3 1 3 3 3 3
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2 2 \/ /\ 1000 1000 1000 1000
output:
0
result:
ok 1 number(s): "0"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
5 9 \\/\\\/\\ \/\//\/\/ /////\/// \/\\\\\\/ /\//\//// 1 1 1 2 2 2 1 1 1 2 1 1 2 2 2 1 2 1 2 2 2 2 2 1 2 2 1 2 1 2 1 1 2 1 2 1 1 2 2 1 2 1 2 2 1
output:
3
result:
ok 1 number(s): "3"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
10 8 \\\/\\\/ //////\/ ////\\/\ \/\\\/\\ \\//\\\/ \\\/\\\\ /\\/\/// \/////\\ //\\\\// \//\\/\/ 2 2 1 2 1 2 2 2 1 1 2 1 1 2 1 2 1 1 1 2 1 2 1 2 1 1 2 2 2 1 1 2 2 1 2 1 2 2 1 2 2 2 1 2 1 2 1 1 1 1 2 2 2 1 2 1 2 1 1 1 2 1 2 2 2 1 2 2 1 1 2 2 1 1 1 2 1 2 1 1
output:
4
result:
ok 1 number(s): "4"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
9 8 //////// \\///\// /\/\\\\/ \/\\//// ///\//\/ //\\//// \/\/\\/\ /\\\\\/\ /\//\\/\ 2 1 1 1 1 1 2 2 2 2 2 2 2 1 1 1 2 2 1 1 2 1 1 1 1 1 1 2 2 2 2 2 1 1 1 2 1 2 2 2 1 2 2 1 2 1 1 1 1 1 2 2 1 2 2 1 1 1 1 2 1 2 2 2 1 1 1 1 1 1 1 1
output:
1
result:
ok 1 number(s): "1"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
10 9 \\/\\/\// /\//\\//\ /\/\\\/\/ /\\\\/\// ////\\//\ \/\//\\/\ \\\//\\// \\/\//\\\ //\\///\/ \\/\/\\\\ 1 1 2 1 1 1 2 2 2 1 1 2 1 2 2 2 1 1 1 2 1 1 2 1 1 1 1 2 1 2 1 1 1 2 1 2 2 2 1 2 1 1 1 1 1 2 1 2 2 2 2 1 1 2 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 2 1 1 2 1 1 1 2 1 2 2 1 1 2 2 1 2 2 2 1 2
output:
6
result:
ok 1 number(s): "6"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
9 6 /\\/\/ /\\/\\ \\//\\ /\/\/\ /\//// \//\\/ \\\\// /\//\\ \\\\// 1 1 2 1 2 1 2 1 2 2 2 2 1 1 2 2 1 1 1 1 2 1 2 1 2 1 2 1 1 1 2 1 1 2 1 2 2 1 1 1 2 2 2 2 1 1 2 2 2 2 2 2 2 1
output:
3
result:
ok 1 number(s): "3"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
8 7 /////\\ \/\\\\/ \/\///\ \//\/\/ \\//\/\ \/\\\\\ \/\//// \\\\\// 1 2 1 2 2 2 1 1 1 1 2 1 2 1 1 1 1 1 1 2 1 2 1 1 2 1 2 2 1 2 1 1 2 2 1 1 1 1 2 2 2 2 2 1 2 1 1 2 2 2 1 1 2 2 2 2
output:
2
result:
ok 1 number(s): "2"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
6 5 \\\\\ \/\\/ /\\// ///// //\/\ /\\/\ 2 2 2 2 1 1 2 1 1 2 1 1 1 2 1 2 1 2 2 1 1 2 2 2 2 2 2 1 2 2
output:
0
result:
ok 1 number(s): "0"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
9 10 /\\/\\\\/\ //\/\///// //\\/\/\\/ ////////\\ \\/\\/\/// /\//\\/\// /\\/\/\\\/ \\\/\\\\\/ \\/\\\/\// 2 1 2 2 1 1 1 1 1 2 2 1 1 2 1 2 2 2 1 2 2 1 2 2 1 1 1 2 2 2 2 2 2 2 1 1 2 1 2 1 1 1 2 1 2 1 1 1 1 1 1 1 2 1 1 2 2 2 2 2 2 1 1 1 2 1 1 1 1 2 2 1 2 2 2 1 1 1 1 2 1 2 2 1 2 2 1 1 2 2
output:
3
result:
ok 1 number(s): "3"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
7 9 \////\//\ ////\\//\ //\//\/\/ //\/\///\ \\\\\/\// \///\/\// //\/\\/\/ 1 2 2 1 2 2 1 1 2 2 1 2 1 1 1 1 1 2 2 2 1 2 1 2 1 2 1 2 1 1 2 1 1 1 2 2 2 1 1 2 2 1 1 2 2 2 2 2 2 1 1 2 2 1 1 2 1 1 2 1 2 1 1
output:
4
result:
ok 1 number(s): "4"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
10 8 \\//\/// //\//\\/ /\\\\\/\ ///\\\\/ //\///\/ //\/\/// ////\//\ ////\/// \//\/\/\ \\/\//// 1 1 1 2 2 2 1 1 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 1 2 1 1 2 1 1 2 2 2 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 1 2 1 1 2 2 2 2 2 2 2 1 2 1 1 1 2 1 2 1 2 2 2 1 2 2 2 1 2 2 1 2
output:
4
result:
ok 1 number(s): "4"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
5 9 /\/\/\/\/ \/\/\/\/\ /\/\/\/\/ \/\/\/\/\ /\/\/\/\/ 2 2 1 2 2 2 1 2 2 2 1 2 1 1 2 1 2 1 1 1 1 1 1 2 1 1 1 2 1 2 2 2 2 2 2 1 1 2 1 1 2 1 1 1 1
output:
16
result:
ok 1 number(s): "16"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
3 10 \\\\\\\\\/ /\\\\\\\/\ \/\\\\\/// 988 904 582 541 330 570 729 782 580 390 714 150 467 865 528 108 351 760 754 984 144 787 319 707 928 677 756 10 551 910
output:
144
result:
ok 1 number(s): "144"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
9 5 /\\\/ /\//\ \/\// \//\\ /\\/\ ///\/ \/\\\ /\/// /\/\\ 456 340 389 946 922 31 408 366 23 632 486 796 288 582 867 956 867 397 423 467 114 59 158 755 677 45 312 673 852 392 465 422 677 904 10 959 996 556 286 669 734 375 886 542 813
output:
1003
result:
ok 1 number(s): "1003"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
9 10 /\////\\\/ \/\\//\\// \///\/\/\/ /\\/////\/ /\/\\\//\/ \//////\// \/\/\/\\// //\/\////\ /////\//// 885 329 408 535 914 1000 235 918 155 895 479 802 845 516 417 257 87 784 738 774 237 134 513 855 159 960 887 985 847 162 936 128 415 197 472 712 177 85 748 279 581 20 917 448 78 749 657 97 309 33 7...
output:
605
result:
ok 1 number(s): "605"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
5 7 \\////\ //\//\/ \/\\\/\ \//\\/\ //////\ 18 584 850 954 344 148 178 913 457 677 456 719 29 842 391 212 546 268 631 550 17 466 843 540 790 525 114 787 587 669 687 898 373 402 537
output:
177
result:
ok 1 number(s): "177"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
7 9 /\\/\\/\\ ///\///// ////\\\\/ \\//\/\/\ /\/\\\/\/ /\\\\///\ \\//\/\\\ 425 513 473 617 589 277 671 309 277 824 479 351 26 813 45 612 514 67 936 405 446 779 83 501 477 373 88 910 32 484 872 156 548 430 196 88 819 765 720 686 163 376 786 615 205 794 599 32 751 442 575 257 139 978 948 200 758 161 55...
output:
723
result:
ok 1 number(s): "723"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
9 10 /\\/\\/\/\ \//\//\\\/ \\\\\/\\// //\/\/\/\\ /\/////\\\ \\\\//\//\ /\//\\\//\ /\//\\\//\ \\\//\\\\\ 18 179 426 592 233 822 635 683 10 185 855 383 11 134 464 551 987 756 118 660 482 100 107 531 63 324 672 282 376 152 517 271 798 556 421 825 494 715 295 277 49 979 382 50 876 791 882 813 681 548 15...
output:
942
result:
ok 1 number(s): "942"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
10 8 \\/\/\// \/\\//\\ \//\//\\ \///\\\/ \/\///// //////\\ \\///\\\ //\\\/\/ /\//\\// \/\\\\\\ 202 525 904 892 951 804 420 199 896 780 934 326 72 208 206 288 136 770 125 551 50 854 527 105 39 316 552 818 146 425 123 152 475 998 868 102 366 912 552 545 577 382 96 878 673 135 394 458 533 473 432 200 8...
output:
1086
result:
ok 1 number(s): "1086"
Test #21:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
8 6 /\/\// /\/\/\ /\\\/\ \\\\/\ //\/\\ \\/\/\ \\//\/ /\\/// 722 545 360 734 880 768 684 165 511 171 561 443 561 713 271 531 264 936 366 20 799 962 85 434 679 107 799 690 396 220 321 18 470 171 654 710 889 921 923 964 805 170 43 178 206 633 475 562
output:
359
result:
ok 1 number(s): "359"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
9 7 \\\\//\ /\//\/\ /\\\/\/ ////\// /\\///\ \/\\\\/ //\///\ ////\/\ \\\\\// 665 917 427 677 532 675 904 838 721 332 615 546 851 727 748 856 394 634 818 107 529 827 333 530 729 522 368 959 29 148 353 256 836 138 48 161 987 40 772 368 752 702 845 592 432 306 251 919 65 405 910 967 281 969 875 416 437 ...
output:
1098
result:
ok 1 number(s): "1098"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
10 3 /\\ /\/ \\/ /\\ //\ //\ /\/ \\/ //\ /// 527 983 920 825 540 435 54 777 682 984 20 337 480 264 137 249 502 51 467 479 228 923 752 714 436 199 973 3 91 612
output:
51
result:
ok 1 number(s): "51"
Test #24:
score: 0
Accepted
time: 1ms
memory: 5640kb
input:
3 10 /\/\/\/\/\ \/\/\/\/\/ /\/\/\/\/\ 258 696 318 984 422 556 508 388 170 577 903 914 312 920 188 520 908 648 857 796 822 113 976 674 428 890 592 587 941 253
output:
2958
result:
ok 1 number(s): "2958"
Test #25:
score: 0
Accepted
time: 2ms
memory: 4204kb
input:
84 62 //\//\//\\/\\/\\///\\\\\\/\\\/\/\/////\\///\\\/\/\\\//\//\/\/\ /\/\\\/\////\/\//\/\\/\\\/\\\/\//\\\\\//\/\////\//////\//\\/// /\\///\/\\\/\\//\//\/\\\//\\\\//\\\\/\\//\\/\/\/\///\//\/\//\/ /\/\/\\/\\\/\///\///\//\\//\\//\/\/\/////\//\\/\\\////\\\/\\/\ \\///\////\\\\//\\////\//\\//////\/\\\////...
output:
502
result:
ok 1 number(s): "502"
Test #26:
score: 0
Accepted
time: 2ms
memory: 6324kb
input:
94 87 \/\//\//\/\///\\////\\/\\\/\/\\///\\/\\\\\/\/////\\/\\\\\///\/\/////\///\\\\\///\\/\/\/ \//\\//\/\///////////\\////\/////\//\//\\\//\//////\/\\\\/\//\/\/\\//\/\/\///\\/\////// ///\\\//\\/\\////////\\\///\\\//\////\/\/\/\//\\////\/\\\//\\/\/\///\\\\\\/\\\///\\\/\/ \//\//\/\//\/\///\/\\/\\\\//\/...
output:
784
result:
ok 1 number(s): "784"
Test #27:
score: 0
Accepted
time: 1ms
memory: 5824kb
input:
98 32 /\\\//\//\//////\\\\//\\\\////\/ \///\///\\/\///\/\\\///\/\/\\\\\ ///\\\\///\\\/\\\\/\\\//\\/\\/\/ \\\//\\\\\\//\\\\\\\\/\/\//\//\\ \\//\\\/\\\\\\///\//\\\/\\/\\\\/ /////\/\\\/\///////\////\/\/\\// //\/////\////\\\/\//////\/\/\/\/ \/\//\//\/\//\//\//\///\\/\\\/// \/\\////\\\///\/\\/\/////\/\\\...
output:
290
result:
ok 1 number(s): "290"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3984kb
input:
68 75 \/\\\/\/\/\\//\/\////\///\\\/\///\/\\\/\///\\/\\\\/\\\//\/////\//\//\\\\\\\ /\\\/\/\/\\\\/\/\\/\\\//\/////\///\/\\\\\\/\/\/\\//\\/\\\//\/\///\//\\\//// \//\///\/\/\\////\\\\\\///\\\\/\/\\//\/\//\////\\/\\/\//\\\/\\\//\\\\\//\/\ /\//\///////\\\/\///\\\////\\//\//\/\/\\/\\/\///\/\////\///\\//\//...
output:
471
result:
ok 1 number(s): "471"
Test #29:
score: 0
Accepted
time: 0ms
memory: 4300kb
input:
81 77 //\/\/\\///\///\\/\\//\//\\/\//\\\\\//\///\\//\/\\/////\\\\\\\////\\\/\\//\/\ \\\\/\//\\/\//\//\/\/\\/\\//\\/\\\\/////\\/\/\\\//\\\\\\\///\\\\\\/\///\/\//\ /////\\\//\/\//\\\\\/////\//\//\//\///\/\/\///\////\\\\///\\\/\/\\\\\////\\\/ \/\/\\//\\\/\/\/\//\/\//\/\/\/\/\\\\//\\///\//\\///\/\\/\\/\...
output:
581
result:
ok 1 number(s): "581"
Test #30:
score: 0
Accepted
time: 1ms
memory: 3932kb
input:
42 53 \\\/\\/\/\\/\\/\\\///\///\\\\//\/////\\//\\\/\\\\\/\\ \////\\///\/\\//\\\\\\\\\\/\///\\///\//\/\\\\///\/\\/ /\/\///////\\//\\/\////////\\/\//\\\//\//\/\\////\/\/ ///\//\\/\/\\/\///\\\///\//\/\/\\\\/\/\///\\\//\/\\\\ //\\/\\//\/////\///\\\\\\/\//\\/\/\\\//\\/////\////\/ //\////\\\//\//\/\\\//\\...
output:
210
result:
ok 1 number(s): "210"
Test #31:
score: 0
Accepted
time: 2ms
memory: 4124kb
input:
78 84 \/\\\\/\\///\\\////\\/\\\\//\\/\///\\//\\\\\\\\//\\///\/\/\//\////\\/\\\//\///\\\//\ \\/\\/\/////\/\////\///\/\\/\\/\\\\//\//\///\/\\////\///\/\\\//\\/\/\//\/\//\\\//\/\ ////\\//\//\\\//\\/\/\\\/\\\//\///\//\\///////\//\\/\///\//\\//\/\\//\////\/\\/\//// \\\\\//////\/\///\\/\\/\/\\///\\\/\/\\\...
output:
646
result:
ok 1 number(s): "646"
Test #32:
score: 0
Accepted
time: 2ms
memory: 4140kb
input:
87 66 //\////\/\\/\\////\/\//\\\/\///\\\\/\\//\/\\/\\\/\\\\\\\/\\\\/\\// /////\\\\///\/\/\\/\\//\\////\/\///\\//\\\\\/\\///\\/\/\///\//\/\\ \\\//\\\\///\\/\//\/\///\/\\\\//\//\\\//\\///\\\\\\\\//\\\\\/\/\\/ \//\////\//\\\/\/\\/\\\/\/\/\//////////\\/\/\\\\\\\/\/\/\/\\///\\\ /\/\///////\/\/\\//\\/\\/\...
output:
532
result:
ok 1 number(s): "532"
Test #33:
score: 0
Accepted
time: 2ms
memory: 4296kb
input:
77 93 \\\///\/\/\\\\\\/\/\\\\\\/\//\///\/\//\///\\\\/\/\////\/\/\///\//\//\\/\\/\\///\\\\\\/\\\/\/\ /////\\///\\\/\/\\\//\//\/\/\/\/\\\/\////\/\//\/\\/\\\/\\\/\//\\\\\//\/\////\//////\//\\////\ \///\/\\\/\\//\//\/\\\//\\\\//\\\\/\\//\\/\/\/\///\//\/\//\//\/\/\\/\\\/\///\///\//\\//\\//\/ \/\/////\//\...
output:
704
result:
ok 1 number(s): "704"
Test #34:
score: 0
Accepted
time: 2ms
memory: 5988kb
input:
65 74 \/\/\\\/////\\/\\//\\//\\//\///\///\\\\\//\//////\/\\\\\/\\\/\\\/\/\/\\\\\ /\///\\//\\\\\////\\/\\\\\/\\//\\\//\////\/\//\///\\\\\\\\///\/\/\\\/\\/\\ //\\/\/\\\//\/\//\\\\///\\\///\\//\/\//\\\\\///\\/\/\/\/\\//\/\/\\/\/\/\\/ /////\/\\\/\\\\\///\//\/\\//\/\\\\/\\\\//\\/\/\\/////\/\/\/\/\\/\//\/...
output:
470
result:
ok 1 number(s): "470"
Test #35:
score: 0
Accepted
time: 1ms
memory: 4320kb
input:
84 62 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
2770
result:
ok 1 number(s): "2770"
Test #36:
score: 0
Accepted
time: 2ms
memory: 4144kb
input:
85 62 ///\/\/\/\/\/\///\\/\/\\\//\//\\\\\\\/\/\///\///\\//\/\//\\/\/ /\\/\\/\\\/\/\\\\\/\//\\\////\\\\\/\///\/\//\/\\\\\/\//\/\\//\ \\///\///\////\//\//\//\\\\\\\\//\/\\/\\/\///\//\//\\\/////\/\ \/\/////\/////\\\/\/\/\\\\\/\\/\\\\\/\\\/\/\\\////\\/\\/\\\\\/ ///\\//\\\\\\//\\//\///\//\/\/\//\///\/\//...
output:
88417
result:
ok 1 number(s): "88417"
Test #37:
score: 0
Accepted
time: 2ms
memory: 4344kb
input:
91 71 //\/\\\\\\\/\\/\//\\\/\/\/\\\\\///////\\\\\\\\//\/\//\/\\\\\\//////\\/\ \\/\\\/\/\/\/\/////\\///\/\\/\\\\///\\\//\//\//\///\//\\\//////\\////\\ \\\\//\\/\//\\\/\\///\/\/\\\/\//\\\\\/\\\\\\/\/\\\//\\/\\/\\\/\///\\/\/ \/\\/\\//\\/\\\\\//\\\////\\//\//\////\\\\\\//\\////\/\\\/\\/\/////\/\\ //\\/\...
output:
99481
result:
ok 1 number(s): "99481"
Test #38:
score: 0
Accepted
time: 0ms
memory: 4120kb
input:
98 79 \\\//\//\/\//\\\///\/\////////\///\//////\///\\\\/\\/\\///\\//\\/\\\//\\\\///\/ ///\\//\/\/\\///\\////\\/\\\\//\\///\////\\\//\\/\\\\//\/\//\/////\\\/\\\\/\/\/ //\\//\/\/\\//\/\\/\\\\\\/\////\\\\\///\/\\\////\/\//////\/\//\/\\/\//\\////\\\ \\/\//\\\//\\\\//\/\\///\//\\/\\\\//\//\////\///\\\///...
output:
127160
result:
ok 1 number(s): "127160"
Test #39:
score: 0
Accepted
time: 1ms
memory: 3952kb
input:
49 73 ////\\\\//\/\/\////\///\/\\\\//\\\/\\\\\\/\\\//\\//\\//\\\//\/\/\\\\/\\\/ ///\\\//\/\\\\/\////\////\/\\\//\\/\/\\\/\//\/\/\\/\/\//////\/\/\\\/\\\\/ \///\\/\\\//\///\/\/\/\//////\\\/\/\////\\\///\\\\\//\/\/\///\\/\\/\\\\// /\/\/\\/\\/\\\\///\\\\\/\\///\//\\\\/\/\///\///////\///\///\\//\\\\///\\...
output:
56715
result:
ok 1 number(s): "56715"
Test #40:
score: 0
Accepted
time: 2ms
memory: 4148kb
input:
89 78 \/\//////\\\\///\\\\\//\\\//\\//\/\\/\//\\//\\\/\/////\////\\//\/\//\\/\/\\/// \\\\/\////////\\\/\////\///\/\/\//\/\\//\/\\//\/\\/\//\\/\/\/\\///\//\///\\\\/ ////\\/////\///\\//\/\\\/\//\///\\\/\\//\\\//\/\\//\\\\\\////\\//\\/\\\/\///// //\/\\/\\\/\/////\\///\\/\\\\\\\\////\\/\/\//\\///\///\/\...
output:
129679
result:
ok 1 number(s): "129679"
Test #41:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
66 56 \\\\\/\\/\/\////\\\\/\\\\/\\///\\/\//\\\//\\////\/\//\// ////////\\\//\/\\//\/\/\/\\/\/\\\/\/\\\\\/\/\\//\\////\\ //\/////\///////\\\\\/\/\/\\//\//\\\//\\\/\\\/\///\\///\ ///////\\\\/\\/\\/\\/\/\\\/\\////\\\//\\\\\/\\\/\/\//\\/ /\/\\/\//\/\/\\//\\/\//\/\\\/\//\/\\//\\/\\/\\/\/\///\// /\\\\/\\\...
output:
56022
result:
ok 1 number(s): "56022"
Test #42:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
25 39 ///\//\/\\/\\/\\\\///\\////\\\\\/\//\\/ //\/\\\\\\\\\\\\\\\/\\/\\//\////\\\\\\\ \\\/\//\\\\\\/\/\\/\\/\\//\/\\\/\////\/ \/\///////\\///\\\\/////\/\/\\/\//\//\\ \///\\/\\////\/\\/\\\\//\\\\//////\\/\\ /\/\\/\\\///\\////////\//\\///\\/\\/\\/ \/\/\//\///\\\/\/\\///\\\//\\\\/\/\/\// \//\\\/\////\\...
output:
10277
result:
ok 1 number(s): "10277"
Test #43:
score: 0
Accepted
time: 1ms
memory: 4000kb
input:
58 43 \/\\\//\\/////\\\\//\/////\//\\///\\/\\\\/\ /\\/\\\////////\\\/\/\///\//\//\\//\/\///\\ /\/\\////\\\///\\\//\\/\/\\/////\\\//\/\/\/ \//\\/\/\//\/\/\//\\\\\\/\///\/////\\\/\\/\ //\\/\////\////\\//\/\//\\\\\/\/\/\/\//\/\\ /\\\//\//\\\/\\\//\\\//\\/\//\/\\\/\\\\/\\/ //\/\\/\\///\/\/\//\///\\\////...
output:
42219
result:
ok 1 number(s): "42219"
Test #44:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
78 99 \\\//\\/\///\/\\\/\/\//\\\/\//\\\////\\////\//\\\\\///\\\/\////\//\/\\\\/\//\//////\\/\\\\///\///\\ /\\\\////\\\\\\\\//////\\\\//\/\\\///\\\/\//\////\\/\/\\\//\///\//\\\\\/////\\\\\////\/\\\\\//\/\\/ //\/\/\/\/\\\\//////\////\\\/\/\\/\//\\\\//\///\\\\/\\//\\\\\\\\\/\/\\/\/\/\//\\/\\\/\//\/\//\...
output:
137204
result:
ok 1 number(s): "137204"
Test #45:
score: 0
Accepted
time: 2ms
memory: 5876kb
input:
91 82 /\///\/////\//\\//\\\/////\\\\//\\\\///\/\\//\\\/\///\\\///\/\\\//\\\/\/\\/////\\/ \\\/\////\/\//\\\////\\/\\/\/\//\/\//\\\\\\\\//\\\///\/\\\//\\\/\\\/\/\\/\////\/// \/\/\//\/\\///\//\/\/\/\//////\/\\\/\\\//\\/\/\\\//\/\\\\///\\\///\///\//////\\\\/ /\/\/\\\\/\/\\\\/\/\/\\\/\\/\/\\\\\/\/\\/////...
output:
123736
result:
ok 1 number(s): "123736"
Test #46:
score: 0
Accepted
time: 2ms
memory: 4248kb
input:
85 62 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
676676
result:
ok 1 number(s): "676676"
Test #47:
score: 0
Accepted
time: 136ms
memory: 58052kb
input:
750 904 /\\\/\/\//\\\\/\/\///\\/\\//\//\\/\\\\\\\/\\\/\\\/\/\\\\/\//\\\/\\//////\\//\/\\\/\\////\//\/\///\\\\\//\//\\//\\//\\/\\\/\\\/////\\/\\\\\\/\/////\///\///\/\/\/////\/\\\//\\/////\\\\//\/////\//\\///\\/\\\\/\/\\/\\\////////\\\/\/\///\//\//\\//\/\///\\/\/\\////\\\///\\\//\\/\/\\/////\\\//\/\/\...
output:
69332
result:
ok 1 number(s): "69332"
Test #48:
score: 0
Accepted
time: 77ms
memory: 32416kb
input:
747 525 \////////\\\\//\/\/\\//\\\/\\\/\/\////\//////\/\//\\//\/\/////\\//\//\//\/\\\\\/\/\\\\\/\\/\/\//\\\/////\\//\/\//\\\///\/\//\/\/\\///\///\\////\\\\/\//\/\\//\\\/\/\///\/\\\/\/\/\\/\\//\\//\\/\/\\\\////\\\\\\\/\/\\\\\/\\//\/\\/\////\/\/\\\/\\//\\\\///\//\\\//\/\/\/\////\\\/\//\\/\\\////\/\\\\...
output:
40087
result:
ok 1 number(s): "40087"
Test #49:
score: 0
Accepted
time: 141ms
memory: 57144kb
input:
804 921 /\\/\\/\\\///\///\\\\//\/////\\//\\\/\\\\\/\\\////\\///\/\\//\\\\\\\\\\/\///\\///\//\/\\\\///\/\\//\/\///////\\//\\/\////////\\/\//\\\//\//\/\\////\/\////\//\\/\/\\/\///\\\///\//\/\/\\\\/\/\///\\\//\/\\\\//\\/\\//\/////\///\\\\\\/\//\\/\/\\\//\\/////\////\///\////\\\//\//\/\\\//\\/\\\\//\\//...
output:
75265
result:
ok 1 number(s): "75265"
Test #50:
score: 0
Accepted
time: 129ms
memory: 57560kb
input:
861 782 /\\\\/\//\//////\\\/\\\\//\\\///\/\\\\\//\\///\\\\\/\\//\//\\\\///\/\/\/\\\///\\////\\////////\\\\/\///\///\\//\\/\///\\\////\\///\\\\\\\\/////\\//\\\/\/\//\/\\\\///\//\\\\\\/\/\\\//\\//////\\\\\/\/\\\\\///\//\\///\\/\\////\\/\///\/\////\/\///\\\\\/\/\//\\\\\//\\/\/\///\/\\/\\\\//\\//\/\/\\\...
output:
68136
result:
ok 1 number(s): "68136"
Test #51:
score: 0
Accepted
time: 108ms
memory: 57700kb
input:
665 845 \///\\\\\///////\\\/\\\//\\//\\///////\\\//\\\//\\////\/\\/\//\/\\\/\\/\\\/\/\\//\///\\//\//\/\////////\/\\\/\////\\\///\\/\/\//\\////\\/\\\\////\\//\////////\\\/\\\//////\//\//\\\/\\//\/\\/\/\/\\//////\//\\\/\/\\////////\/\\/\\//\\/\\/\//\////\\/\/\///\//\\//\\//\\//\/\\/\//\/\\/\/\\\\//\//...
output:
57626
result:
ok 1 number(s): "57626"
Test #52:
score: 0
Accepted
time: 78ms
memory: 33204kb
input:
468 952 /\\///\///\\\\/\\\\\\///\\/\/\\\//\\/\\//\\//\\\/\/\//\\//\\\\\\///\\\/\\/\/////\\\\//\\/\/\\//////\/\/\/\\/\/\/\\\\//////\\///\/\\\\///\/\/\\\\//\\\\\\//\/\\\/\\//\//\///\\\\///\/\\\/\\\//\/\//\\\\\///\//\\/\\\\//\\\\/\/\\/\\\/\\/////\/\\\\\////\\//\\\/\/\\\\\/\//\\/\\/\//\/\\\\//\/\/\/\/\/...
output:
45070
result:
ok 1 number(s): "45070"
Test #53:
score: 0
Accepted
time: 55ms
memory: 33032kb
input:
463 659 /\\\/\/\\/\\\//\/\/\/\/\\///\//\\\\/\\//\\/\\/\//\/\\\//\\/\/\\\/\//\/\\\//\\//\\/\\/\/////\\\//\\\///////\/\/\\//\/\/\\\\\\///\///\\/\/////\///\//\//\//\\//\\\\/\\/\\\\//\\/\\/\\/\/\\\/\/\\\//////\/\\/\\\/\/\\\\/\//\/\\//\//\\//\/\\\\\///\/\/\/\/\\/\\\///\\//\\//////\\//\\/\\/\/\\/\///\\//\...
output:
30900
result:
ok 1 number(s): "30900"
Test #54:
score: 0
Accepted
time: 25ms
memory: 20512kb
input:
963 167 \////////\\\/\///\///\\\///\/\\//\/\\//\//\/\\/\\\//\//\/\/\////\///\/\\\\\\\\\/\\//\////\//\\/\\/\\/\//\/\\/\////\/\///\/\\/\/\\/\///\\/\/\\/\\/\//\/\/////\/\/\//\//\ /\\\\/\\\\/\\\\\\/\\\//\\\//\/\//\//\\/\\\\//\\//\////\\///\\\\//////\\\\/\/\//\/\\//\\\\\\\\/\\//\/\\\\/\\//\\\/\///\/\\//\...
output:
16193
result:
ok 1 number(s): "16193"
Test #55:
score: 0
Accepted
time: 115ms
memory: 56784kb
input:
851 676 /\\//\/\\\/\/////\///////\\/\///\\\//\//\/\\/\\/\\/\//\/\/\/\\///\\\/\\/\\//\////\//\\\\\\//\/\\\\\\////\\//\/\/\\\/////////\\\\/\\\\//\\/\//\\/\\\/\/\\/\////\\\\////\//\\\\\\\\\\//\///\\/\///\///\\\\/\/\\\\/\\//\/\\\\\/\\////\//\\//\\/////\\/\/\//\\/\\//\/\/\////\/\\\//\//\/\/\\/\\\/\\////\...
output:
58420
result:
ok 1 number(s): "58420"
Test #56:
score: 0
Accepted
time: 134ms
memory: 58092kb
input:
865 874 /\\\\\//\\/\/\\\//\\\\\/\//\\\\///\\\/\\/\/\\/////\/\//\\\\\/\//\\\\\\\///\////\\/\////\/\\//\/\\/\\/\/\\//\//\\\/\\\\\/\\////\/\/\/\\/\/////\\\\\\\//\//\/\//\\\//\/\//\\\//\\\\//\\\\\\/\\/\//\////\\//\\\\\///\\\\\//\\//\/////\\\/\//\\\/\//\\//\/\\\/\\/\\\\\\\\\/\/\/\\\\\////\//\\\\/\\//////...
output:
76590
result:
ok 1 number(s): "76590"
Test #57:
score: 0
Accepted
time: 108ms
memory: 57676kb
input:
750 904 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
371368
result:
ok 1 number(s): "371368"
Test #58:
score: 0
Accepted
time: 192ms
memory: 57644kb
input:
936 739 //\\/\\/\//\\\\\/\\\//\/\/\/\/\//\\//\///\\\/\///\//\\\/\\\/\\\/\/\\\//\\\\/\/\//\//\/\\/\\///\///\///\\/\//\/\\\/\\//\\/\\/\\\\\\\\///\\////\//\\/\\\\//\////\\/\\\\//////////\\\/\/\\/\\//\\\//\\/\/\/\/\///\/\\\/\\\/\//////\//\\///\/\\/\\//\\\/\//\/\/\\\\\////\/\/////\\//\\\\\/\////\/\///\/\...
output:
11934107
result:
ok 1 number(s): "11934107"
Test #59:
score: 0
Accepted
time: 167ms
memory: 57400kb
input:
676 944 /\\\/\/\///\/\\/\/\\\/\//\/\\///\/\\\\\\/\\///\/\\\\\//\\//\\/\\/\////\/\/\/\/\///\//\//////\\\\\/\\\\\\\\///\\/\/\\//\\/\\\\//\//\///\//\//\///\\\/\\///\/\\\///\/\/\\\\\/\//\//\///\///\\\\///\\/\//\\/\\\/\/\\\\\\//\/\\////\\//\\//\/\\//\\////\///\\\/\\/\////\\/\\/\/\/\\\\/\////////\//\\/\\\...
output:
10930726
result:
ok 1 number(s): "10930726"
Test #60:
score: 0
Accepted
time: 62ms
memory: 31676kb
input:
365 718 /\\\\\\/\/\\\////\\////\/\//\\\\/\//\/\\/\///\\/\/////\/\/\//\\////\///\\/\/\\\\\/\///\\////\/\//\\//\///\\/\\///\/\//\\/\\\//\/\//\\/\\\\/\////\//\\\//////\\\/\\///\/\\\\\//\\\\//\//\\//\\/////\//////\\//\/////\/\/\/\/\//\\\\\\\/\/\\/\\\/////\\/\///\/\\/\\///\/\////\\\\\//\/\/\//\\/\/\\//\\...
output:
4489005
result:
ok 1 number(s): "4489005"
Test #61:
score: 0
Accepted
time: 178ms
memory: 58816kb
input:
947 717 ////\\/\/\\\\\/\\/\\\\/\///\/\/\/\/\\\///\\///\/\\\\/\/\/\\///\\/\/\//\//\\\\/\\////\///\/\\\\\\\\\/\/\/\\//\//\/\////\\\//\//\/\\\///////\\\\//\/\\\\///\\\\//\/\\/\/\//\/\/////\\\/\\/\\//\/\/\/\\\//\//\\/\/\\\////////\\\/\\\\/\\\//\//\//\\/\////////\\\//\////\/\\\\///\///\\//////\\/\\\\/\\\...
output:
11690504
result:
ok 1 number(s): "11690504"
Test #62:
score: 0
Accepted
time: 145ms
memory: 58048kb
input:
579 909 ////\///\\\\/\//\\///\/\\\\\/\\/\/\//\///\/\/\////////\////\/\\/\/\////\//\\/\\\/\\/\\\\\//\\/\//\\\///\//////\\//\/\\\\\//\/\/////\\/\\/\\////\\/\/\//\/\\\/\/\\\/\\////\/\//\/\/\\///\/\\/\/\/////////\\\///\///\//\\\////\//\/\//\\//\/\/\//\\/\\\/\/\\\\\\\/\//\\/\/\//\\\/\\\\/\/\/\\\//////\/\...
output:
9049328
result:
ok 1 number(s): "9049328"
Test #63:
score: 0
Accepted
time: 211ms
memory: 57840kb
input:
964 834 /\/\//\\\/\\\//////\\\/\\/\//\///\\\///\/\/\\\///\\\/////\\///\\\\\\\//////\///\\\\/////\//\\\\\\/\/\\/\//\/\/\/\///\\\\///\/\\/\\\///\/\/\\///\///\\/\\//\//\\/\//\\\\\//\///\\//\/\\/////\\\\\\\////\\\/\\//\/\\\\\/\//\\/\//\//\/\/\\/\\//\\/\\\\/////\\/\/\\\//\\\\\\\///\\\\\\/\///\/\//\/////\...
output:
13731326
result:
ok 1 number(s): "13731326"
Test #64:
score: 0
Accepted
time: 212ms
memory: 58852kb
input:
825 990 ///\///////\//\\\\////\\/\\\//\\////\\\\/\\\\////\///\\\///\\\\\\/\\\/\\/\///\/\\\/\/\\/\\\\//\///\//\\/\////\//\\//\\/////\\\/\\\//\//\//\\\\/\/\\\\/\\/\\\//////\//\/\\/\/////\/\///\\\/\\/\/\/\\\\/\//\\///\\//\\\\\\/\\\//\\\///\//\/\/\\\//\\\/\/////\\//\\////\\\////\\\\///\\//\\\/\//\/\/\/\...
output:
13983189
result:
ok 1 number(s): "13983189"
Test #65:
score: 0
Accepted
time: 187ms
memory: 57860kb
input:
899 795 \/\//\\\\\/\/\\/////\/\\///////\\\/\\\\//\/\\\\/\//\\/\//\//\/\//\\/\\///\/////\//\\\\/\/\/\//\/\\\\\///////\\/\\/\/\\///\\/\/\\///\\////\\//////\//\/\\/\\\\//\\/////\\\/////\\//\\/\\\\\///\/\\///\/\\//\\/\///\//\/////////\/\/\/////\\\\/\\////\//\\\\\\/\//\/\\\\/\/\/////\//\\\//\//\/\//\/\/\...
output:
12265090
result:
ok 1 number(s): "12265090"
Test #66:
score: 0
Accepted
time: 226ms
memory: 57200kb
input:
841 951 \\\/\\\//\//\\\/\\\\/\\\/\/\//\\/\\//////\//\/\/\\\/\//\\\\\\\\\/\/\\\\\/////\////\\\/\//\\\/\\\/\\//\/\\/\///\///\\/\//\\\/\/\\\\\///\\\/\/\\\//\\\\//\////\\\/\//\\///\\\/////\/\\\////\/\//\\///\////\\\\/\/\\//\/\////\/\\//\\/\/\\/\/\/\//\/\/\\//\/\/////\\/\\\\/////\\//\\\\\/\\\/\\\\\\\//\\...
output:
13682714
result:
ok 1 number(s): "13682714"
Test #67:
score: 0
Accepted
time: 211ms
memory: 57272kb
input:
847 910 \\/\\\\////\/\///\\/\///\////\/\/\/\////////\/\\\\\\\\\//\//\\\\///\//\/\/\//\/\\\//////\\\\/////\\///\//\/\\\\/\\\/\\\\////\////////\//\\\//\\\\\/\\/\/\/\//\///\/\\\/\\////\\//\\\//\/\/\//\//\\\/\///\\//\/\\\/\///\/\/\\///\/\\///\\\\//\\\\/\\/////\\\///\/\\\\/\\/\////\/\\/\\\\\\//\////\\\/\...
output:
13289629
result:
ok 1 number(s): "13289629"
Test #68:
score: 0
Accepted
time: 158ms
memory: 58076kb
input:
936 739 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
92173735
result:
ok 1 number(s): "92173735"
Extra Test:
score: 0
Extra Test Passed