QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#269981 | #7149. Walls | ddl_VS_pigeon# | AC ✓ | 383ms | 70908kb | C++17 | 1.6kb | 2023-11-30 13:13:25 | 2023-11-30 13:13:25 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
struct DSU {
vector<int> f;
DSU(int n) : f(n + 1) {
for (int i = 1; i <= n; i++) {
f[i] = i;
}
}
int getfa(int v) {
return f[v] == v ? v : (f[v] = getfa(f[v]));
}
bool merge(int u, int v) {
u = getfa(u), v = getfa(v);
if (u == v) {
return false;
}
f[u] = v;
return true;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
int n, m;
cin >> n >> m;
vector<string> mp(n);
vector id(n, vector(m, array<int, 4>{0, 0, 0, 0}));
for (int i = 0; i < n; i++) {
cin >> mp[i];
}
vector c(n, vector(m, 0));
int idc = 0;
vector<tuple<int, int, int>> e;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> c[i][j];
if (i > 0) {
id[i][j][0] = id[i - 1][j][3];
}
if (j > 0) {
id[i][j][1] = id[i][j - 1][2];
}
if (j < m - 1) {
id[i][j][2] = ++idc;
}
if (i < n - 1) {
id[i][j][3] = ++idc;
}
if (mp[i][j] == '/') {
e.emplace_back(0, id[i][j][0], id[i][j][1]);
e.emplace_back(0, id[i][j][2], id[i][j][3]);
e.emplace_back(c[i][j], id[i][j][0], id[i][j][2]);
e.emplace_back(c[i][j], id[i][j][1], id[i][j][3]);
} else {
e.emplace_back(0, id[i][j][0], id[i][j][2]);
e.emplace_back(0, id[i][j][1], id[i][j][3]);
e.emplace_back(c[i][j], id[i][j][0], id[i][j][1]);
e.emplace_back(c[i][j], id[i][j][2], id[i][j][3]);
}
}
}
sort(e.begin(), e.end());
DSU dsu(idc);
ll ans = 0;
for (auto [len, x, y] : e) {
if (dsu.merge(x, y)) {
ans += len;
}
}
cout << ans << '\n';
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3428kb
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: 3412kb
input:
2 2 \/ /\ 1000 1000 1000 1000
output:
0
result:
ok 1 number(s): "0"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3420kb
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: 1ms
memory: 3488kb
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: 3532kb
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: 1ms
memory: 3536kb
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: 1ms
memory: 3536kb
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: 3460kb
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: 1ms
memory: 3472kb
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: 1ms
memory: 3452kb
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: 1ms
memory: 3412kb
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: 3412kb
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: 1ms
memory: 3452kb
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: 3480kb
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: 3484kb
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: 3456kb
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: 1ms
memory: 3408kb
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: 3476kb
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: 1ms
memory: 3508kb
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: 3540kb
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: 3420kb
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: 3484kb
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: 3440kb
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: 0ms
memory: 3408kb
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: 3ms
memory: 3756kb
input:
84 62 //\//\//\\/\\/\\///\\\\\\/\\\/\/\/////\\///\\\/\/\\\//\//\/\/\ /\/\\\/\////\/\//\/\\/\\\/\\\/\//\\\\\//\/\////\//////\//\\/// /\\///\/\\\/\\//\//\/\\\//\\\\//\\\\/\\//\\/\/\/\///\//\/\//\/ /\/\/\\/\\\/\///\///\//\\//\\//\/\/\/////\//\\/\\\////\\\/\\/\ \\///\////\\\\//\\////\//\\//////\/\\\////...
output:
502
result:
ok 1 number(s): "502"
Test #26:
score: 0
Accepted
time: 4ms
memory: 3936kb
input:
94 87 \/\//\//\/\///\\////\\/\\\/\/\\///\\/\\\\\/\/////\\/\\\\\///\/\/////\///\\\\\///\\/\/\/ \//\\//\/\///////////\\////\/////\//\//\\\//\//////\/\\\\/\//\/\/\\//\/\/\///\\/\////// ///\\\//\\/\\////////\\\///\\\//\////\/\/\/\//\\////\/\\\//\\/\/\///\\\\\\/\\\///\\\/\/ \//\//\/\//\/\///\/\\/\\\\//\/...
output:
784
result:
ok 1 number(s): "784"
Test #27:
score: 0
Accepted
time: 2ms
memory: 3624kb
input:
98 32 /\\\//\//\//////\\\\//\\\\////\/ \///\///\\/\///\/\\\///\/\/\\\\\ ///\\\\///\\\/\\\\/\\\//\\/\\/\/ \\\//\\\\\\//\\\\\\\\/\/\//\//\\ \\//\\\/\\\\\\///\//\\\/\\/\\\\/ /////\/\\\/\///////\////\/\/\\// //\/////\////\\\/\//////\/\/\/\/ \/\//\//\/\//\//\//\///\\/\\\/// \/\\////\\\///\/\\/\/////\/\\\...
output:
290
result:
ok 1 number(s): "290"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3924kb
input:
68 75 \/\\\/\/\/\\//\/\////\///\\\/\///\/\\\/\///\\/\\\\/\\\//\/////\//\//\\\\\\\ /\\\/\/\/\\\\/\/\\/\\\//\/////\///\/\\\\\\/\/\/\\//\\/\\\//\/\///\//\\\//// \//\///\/\/\\////\\\\\\///\\\\/\/\\//\/\//\////\\/\\/\//\\\/\\\//\\\\\//\/\ /\//\///////\\\/\///\\\////\\//\//\/\/\\/\\/\///\/\////\///\\//\//...
output:
471
result:
ok 1 number(s): "471"
Test #29:
score: 0
Accepted
time: 3ms
memory: 3880kb
input:
81 77 //\/\/\\///\///\\/\\//\//\\/\//\\\\\//\///\\//\/\\/////\\\\\\\////\\\/\\//\/\ \\\\/\//\\/\//\//\/\/\\/\\//\\/\\\\/////\\/\/\\\//\\\\\\\///\\\\\\/\///\/\//\ /////\\\//\/\//\\\\\/////\//\//\//\///\/\/\///\////\\\\///\\\/\/\\\\\////\\\/ \/\/\\//\\\/\/\/\//\/\//\/\/\/\/\\\\//\\///\//\\///\/\\/\\/\...
output:
581
result:
ok 1 number(s): "581"
Test #30:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
42 53 \\\/\\/\/\\/\\/\\\///\///\\\\//\/////\\//\\\/\\\\\/\\ \////\\///\/\\//\\\\\\\\\\/\///\\///\//\/\\\\///\/\\/ /\/\///////\\//\\/\////////\\/\//\\\//\//\/\\////\/\/ ///\//\\/\/\\/\///\\\///\//\/\/\\\\/\/\///\\\//\/\\\\ //\\/\\//\/////\///\\\\\\/\//\\/\/\\\//\\/////\////\/ //\////\\\//\//\/\\\//\\...
output:
210
result:
ok 1 number(s): "210"
Test #31:
score: 0
Accepted
time: 3ms
memory: 3888kb
input:
78 84 \/\\\\/\\///\\\////\\/\\\\//\\/\///\\//\\\\\\\\//\\///\/\/\//\////\\/\\\//\///\\\//\ \\/\\/\/////\/\////\///\/\\/\\/\\\\//\//\///\/\\////\///\/\\\//\\/\/\//\/\//\\\//\/\ ////\\//\//\\\//\\/\/\\\/\\\//\///\//\\///////\//\\/\///\//\\//\/\\//\////\/\\/\//// \\\\\//////\/\///\\/\\/\/\\///\\\/\/\\\...
output:
646
result:
ok 1 number(s): "646"
Test #32:
score: 0
Accepted
time: 3ms
memory: 3800kb
input:
87 66 //\////\/\\/\\////\/\//\\\/\///\\\\/\\//\/\\/\\\/\\\\\\\/\\\\/\\// /////\\\\///\/\/\\/\\//\\////\/\///\\//\\\\\/\\///\\/\/\///\//\/\\ \\\//\\\\///\\/\//\/\///\/\\\\//\//\\\//\\///\\\\\\\\//\\\\\/\/\\/ \//\////\//\\\/\/\\/\\\/\/\/\//////////\\/\/\\\\\\\/\/\/\/\\///\\\ /\/\///////\/\/\\//\\/\\/\...
output:
532
result:
ok 1 number(s): "532"
Test #33:
score: 0
Accepted
time: 3ms
memory: 3900kb
input:
77 93 \\\///\/\/\\\\\\/\/\\\\\\/\//\///\/\//\///\\\\/\/\////\/\/\///\//\//\\/\\/\\///\\\\\\/\\\/\/\ /////\\///\\\/\/\\\//\//\/\/\/\/\\\/\////\/\//\/\\/\\\/\\\/\//\\\\\//\/\////\//////\//\\////\ \///\/\\\/\\//\//\/\\\//\\\\//\\\\/\\//\\/\/\/\///\//\/\//\//\/\/\\/\\\/\///\///\//\\//\\//\/ \/\/////\//\...
output:
704
result:
ok 1 number(s): "704"
Test #34:
score: 0
Accepted
time: 2ms
memory: 3748kb
input:
65 74 \/\/\\\/////\\/\\//\\//\\//\///\///\\\\\//\//////\/\\\\\/\\\/\\\/\/\/\\\\\ /\///\\//\\\\\////\\/\\\\\/\\//\\\//\////\/\//\///\\\\\\\\///\/\/\\\/\\/\\ //\\/\/\\\//\/\//\\\\///\\\///\\//\/\//\\\\\///\\/\/\/\/\\//\/\/\\/\/\/\\/ /////\/\\\/\\\\\///\//\/\\//\/\\\\/\\\\//\\/\/\\/////\/\/\/\/\\/\//\/...
output:
470
result:
ok 1 number(s): "470"
Test #35:
score: 0
Accepted
time: 3ms
memory: 3792kb
input:
84 62 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
2770
result:
ok 1 number(s): "2770"
Test #36:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
85 62 ///\/\/\/\/\/\///\\/\/\\\//\//\\\\\\\/\/\///\///\\//\/\//\\/\/ /\\/\\/\\\/\/\\\\\/\//\\\////\\\\\/\///\/\//\/\\\\\/\//\/\\//\ \\///\///\////\//\//\//\\\\\\\\//\/\\/\\/\///\//\//\\\/////\/\ \/\/////\/////\\\/\/\/\\\\\/\\/\\\\\/\\\/\/\\\////\\/\\/\\\\\/ ///\\//\\\\\\//\\//\///\//\/\/\//\///\/\//...
output:
88417
result:
ok 1 number(s): "88417"
Test #37:
score: 0
Accepted
time: 3ms
memory: 3892kb
input:
91 71 //\/\\\\\\\/\\/\//\\\/\/\/\\\\\///////\\\\\\\\//\/\//\/\\\\\\//////\\/\ \\/\\\/\/\/\/\/////\\///\/\\/\\\\///\\\//\//\//\///\//\\\//////\\////\\ \\\\//\\/\//\\\/\\///\/\/\\\/\//\\\\\/\\\\\\/\/\\\//\\/\\/\\\/\///\\/\/ \/\\/\\//\\/\\\\\//\\\////\\//\//\////\\\\\\//\\////\/\\\/\\/\/////\/\\ //\\/\...
output:
99481
result:
ok 1 number(s): "99481"
Test #38:
score: 0
Accepted
time: 0ms
memory: 3920kb
input:
98 79 \\\//\//\/\//\\\///\/\////////\///\//////\///\\\\/\\/\\///\\//\\/\\\//\\\\///\/ ///\\//\/\/\\///\\////\\/\\\\//\\///\////\\\//\\/\\\\//\/\//\/////\\\/\\\\/\/\/ //\\//\/\/\\//\/\\/\\\\\\/\////\\\\\///\/\\\////\/\//////\/\//\/\\/\//\\////\\\ \\/\//\\\//\\\\//\/\\///\//\\/\\\\//\//\////\///\\\///...
output:
127160
result:
ok 1 number(s): "127160"
Test #39:
score: 0
Accepted
time: 2ms
memory: 3644kb
input:
49 73 ////\\\\//\/\/\////\///\/\\\\//\\\/\\\\\\/\\\//\\//\\//\\\//\/\/\\\\/\\\/ ///\\\//\/\\\\/\////\////\/\\\//\\/\/\\\/\//\/\/\\/\/\//////\/\/\\\/\\\\/ \///\\/\\\//\///\/\/\/\//////\\\/\/\////\\\///\\\\\//\/\/\///\\/\\/\\\\// /\/\/\\/\\/\\\\///\\\\\/\\///\//\\\\/\/\///\///////\///\///\\//\\\\///\\...
output:
56715
result:
ok 1 number(s): "56715"
Test #40:
score: 0
Accepted
time: 3ms
memory: 3824kb
input:
89 78 \/\//////\\\\///\\\\\//\\\//\\//\/\\/\//\\//\\\/\/////\////\\//\/\//\\/\/\\/// \\\\/\////////\\\/\////\///\/\/\//\/\\//\/\\//\/\\/\//\\/\/\/\\///\//\///\\\\/ ////\\/////\///\\//\/\\\/\//\///\\\/\\//\\\//\/\\//\\\\\\////\\//\\/\\\/\///// //\/\\/\\\/\/////\\///\\/\\\\\\\\////\\/\/\//\\///\///\/\...
output:
129679
result:
ok 1 number(s): "129679"
Test #41:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
66 56 \\\\\/\\/\/\////\\\\/\\\\/\\///\\/\//\\\//\\////\/\//\// ////////\\\//\/\\//\/\/\/\\/\/\\\/\/\\\\\/\/\\//\\////\\ //\/////\///////\\\\\/\/\/\\//\//\\\//\\\/\\\/\///\\///\ ///////\\\\/\\/\\/\\/\/\\\/\\////\\\//\\\\\/\\\/\/\//\\/ /\/\\/\//\/\/\\//\\/\//\/\\\/\//\/\\//\\/\\/\\/\/\///\// /\\\\/\\\...
output:
56022
result:
ok 1 number(s): "56022"
Test #42:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
25 39 ///\//\/\\/\\/\\\\///\\////\\\\\/\//\\/ //\/\\\\\\\\\\\\\\\/\\/\\//\////\\\\\\\ \\\/\//\\\\\\/\/\\/\\/\\//\/\\\/\////\/ \/\///////\\///\\\\/////\/\/\\/\//\//\\ \///\\/\\////\/\\/\\\\//\\\\//////\\/\\ /\/\\/\\\///\\////////\//\\///\\/\\/\\/ \/\/\//\///\\\/\/\\///\\\//\\\\/\/\/\// \//\\\/\////\\...
output:
10277
result:
ok 1 number(s): "10277"
Test #43:
score: 0
Accepted
time: 1ms
memory: 3720kb
input:
58 43 \/\\\//\\/////\\\\//\/////\//\\///\\/\\\\/\ /\\/\\\////////\\\/\/\///\//\//\\//\/\///\\ /\/\\////\\\///\\\//\\/\/\\/////\\\//\/\/\/ \//\\/\/\//\/\/\//\\\\\\/\///\/////\\\/\\/\ //\\/\////\////\\//\/\//\\\\\/\/\/\/\//\/\\ /\\\//\//\\\/\\\//\\\//\\/\//\/\\\/\\\\/\\/ //\/\\/\\///\/\/\//\///\\\////...
output:
42219
result:
ok 1 number(s): "42219"
Test #44:
score: 0
Accepted
time: 3ms
memory: 3928kb
input:
78 99 \\\//\\/\///\/\\\/\/\//\\\/\//\\\////\\////\//\\\\\///\\\/\////\//\/\\\\/\//\//////\\/\\\\///\///\\ /\\\\////\\\\\\\\//////\\\\//\/\\\///\\\/\//\////\\/\/\\\//\///\//\\\\\/////\\\\\////\/\\\\\//\/\\/ //\/\/\/\/\\\\//////\////\\\/\/\\/\//\\\\//\///\\\\/\\//\\\\\\\\\/\/\\/\/\/\//\\/\\\/\//\/\//\...
output:
137204
result:
ok 1 number(s): "137204"
Test #45:
score: 0
Accepted
time: 3ms
memory: 3924kb
input:
91 82 /\///\/////\//\\//\\\/////\\\\//\\\\///\/\\//\\\/\///\\\///\/\\\//\\\/\/\\/////\\/ \\\/\////\/\//\\\////\\/\\/\/\//\/\//\\\\\\\\//\\\///\/\\\//\\\/\\\/\/\\/\////\/// \/\/\//\/\\///\//\/\/\/\//////\/\\\/\\\//\\/\/\\\//\/\\\\///\\\///\///\//////\\\\/ /\/\/\\\\/\/\\\\/\/\/\\\/\\/\/\\\\\/\/\\/////...
output:
123736
result:
ok 1 number(s): "123736"
Test #46:
score: 0
Accepted
time: 2ms
memory: 3880kb
input:
85 62 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
676676
result:
ok 1 number(s): "676676"
Test #47:
score: 0
Accepted
time: 271ms
memory: 68552kb
input:
750 904 /\\\/\/\//\\\\/\/\///\\/\\//\//\\/\\\\\\\/\\\/\\\/\/\\\\/\//\\\/\\//////\\//\/\\\/\\////\//\/\///\\\\\//\//\\//\\//\\/\\\/\\\/////\\/\\\\\\/\/////\///\///\/\/\/////\/\\\//\\/////\\\\//\/////\//\\///\\/\\\\/\/\\/\\\////////\\\/\/\///\//\//\\//\/\///\\/\/\\////\\\///\\\//\\/\/\\/////\\\//\/\/\...
output:
69332
result:
ok 1 number(s): "69332"
Test #48:
score: 0
Accepted
time: 158ms
memory: 36124kb
input:
747 525 \////////\\\\//\/\/\\//\\\/\\\/\/\////\//////\/\//\\//\/\/////\\//\//\//\/\\\\\/\/\\\\\/\\/\/\//\\\/////\\//\/\//\\\///\/\//\/\/\\///\///\\////\\\\/\//\/\\//\\\/\/\///\/\\\/\/\/\\/\\//\\//\\/\/\\\\////\\\\\\\/\/\\\\\/\\//\/\\/\////\/\/\\\/\\//\\\\///\//\\\//\/\/\/\////\\\/\//\\/\\\////\/\\\\...
output:
40087
result:
ok 1 number(s): "40087"
Test #49:
score: 0
Accepted
time: 304ms
memory: 68912kb
input:
804 921 /\\/\\/\\\///\///\\\\//\/////\\//\\\/\\\\\/\\\////\\///\/\\//\\\\\\\\\\/\///\\///\//\/\\\\///\/\\//\/\///////\\//\\/\////////\\/\//\\\//\//\/\\////\/\////\//\\/\/\\/\///\\\///\//\/\/\\\\/\/\///\\\//\/\\\\//\\/\\//\/////\///\\\\\\/\//\\/\/\\\//\\/////\////\///\////\\\//\//\/\\\//\\/\\\\//\\//...
output:
75265
result:
ok 1 number(s): "75265"
Test #50:
score: 0
Accepted
time: 275ms
memory: 67680kb
input:
861 782 /\\\\/\//\//////\\\/\\\\//\\\///\/\\\\\//\\///\\\\\/\\//\//\\\\///\/\/\/\\\///\\////\\////////\\\\/\///\///\\//\\/\///\\\////\\///\\\\\\\\/////\\//\\\/\/\//\/\\\\///\//\\\\\\/\/\\\//\\//////\\\\\/\/\\\\\///\//\\///\\/\\////\\/\///\/\////\/\///\\\\\/\/\//\\\\\//\\/\/\///\/\\/\\\\//\\//\/\/\\\...
output:
68136
result:
ok 1 number(s): "68136"
Test #51:
score: 0
Accepted
time: 210ms
memory: 65868kb
input:
665 845 \///\\\\\///////\\\/\\\//\\//\\///////\\\//\\\//\\////\/\\/\//\/\\\/\\/\\\/\/\\//\///\\//\//\/\////////\/\\\/\////\\\///\\/\/\//\\////\\/\\\\////\\//\////////\\\/\\\//////\//\//\\\/\\//\/\\/\/\/\\//////\//\\\/\/\\////////\/\\/\\//\\/\\/\//\////\\/\/\///\//\\//\\//\\//\/\\/\//\/\\/\/\\\\//\//...
output:
57626
result:
ok 1 number(s): "57626"
Test #52:
score: 0
Accepted
time: 179ms
memory: 38180kb
input:
468 952 /\\///\///\\\\/\\\\\\///\\/\/\\\//\\/\\//\\//\\\/\/\//\\//\\\\\\///\\\/\\/\/////\\\\//\\/\/\\//////\/\/\/\\/\/\/\\\\//////\\///\/\\\\///\/\/\\\\//\\\\\\//\/\\\/\\//\//\///\\\\///\/\\\/\\\//\/\//\\\\\///\//\\/\\\\//\\\\/\/\\/\\\/\\/////\/\\\\\////\\//\\\/\/\\\\\/\//\\/\\/\//\/\\\\//\/\/\/\/\/...
output:
45070
result:
ok 1 number(s): "45070"
Test #53:
score: 0
Accepted
time: 111ms
memory: 34172kb
input:
463 659 /\\\/\/\\/\\\//\/\/\/\/\\///\//\\\\/\\//\\/\\/\//\/\\\//\\/\/\\\/\//\/\\\//\\//\\/\\/\/////\\\//\\\///////\/\/\\//\/\/\\\\\\///\///\\/\/////\///\//\//\//\\//\\\\/\\/\\\\//\\/\\/\\/\/\\\/\/\\\//////\/\\/\\\/\/\\\\/\//\/\\//\//\\//\/\\\\\///\/\/\/\/\\/\\\///\\//\\//////\\//\\/\\/\/\\/\///\\//\...
output:
30900
result:
ok 1 number(s): "30900"
Test #54:
score: 0
Accepted
time: 65ms
memory: 19200kb
input:
963 167 \////////\\\/\///\///\\\///\/\\//\/\\//\//\/\\/\\\//\//\/\/\////\///\/\\\\\\\\\/\\//\////\//\\/\\/\\/\//\/\\/\////\/\///\/\\/\/\\/\///\\/\/\\/\\/\//\/\/////\/\/\//\//\ /\\\\/\\\\/\\\\\\/\\\//\\\//\/\//\//\\/\\\\//\\//\////\\///\\\\//////\\\\/\/\//\/\\//\\\\\\\\/\\//\/\\\\/\\//\\\/\///\/\\//\...
output:
16193
result:
ok 1 number(s): "16193"
Test #55:
score: 0
Accepted
time: 228ms
memory: 65428kb
input:
851 676 /\\//\/\\\/\/////\///////\\/\///\\\//\//\/\\/\\/\\/\//\/\/\/\\///\\\/\\/\\//\////\//\\\\\\//\/\\\\\\////\\//\/\/\\\/////////\\\\/\\\\//\\/\//\\/\\\/\/\\/\////\\\\////\//\\\\\\\\\\//\///\\/\///\///\\\\/\/\\\\/\\//\/\\\\\/\\////\//\\//\\/////\\/\/\//\\/\\//\/\/\////\/\\\//\//\/\/\\/\\\/\\////\...
output:
58420
result:
ok 1 number(s): "58420"
Test #56:
score: 0
Accepted
time: 298ms
memory: 69868kb
input:
865 874 /\\\\\//\\/\/\\\//\\\\\/\//\\\\///\\\/\\/\/\\/////\/\//\\\\\/\//\\\\\\\///\////\\/\////\/\\//\/\\/\\/\/\\//\//\\\/\\\\\/\\////\/\/\/\\/\/////\\\\\\\//\//\/\//\\\//\/\//\\\//\\\\//\\\\\\/\\/\//\////\\//\\\\\///\\\\\//\\//\/////\\\/\//\\\/\//\\//\/\\\/\\/\\\\\\\\\/\/\/\\\\\////\//\\\\/\\//////...
output:
76590
result:
ok 1 number(s): "76590"
Test #57:
score: 0
Accepted
time: 242ms
memory: 68284kb
input:
750 904 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
371368
result:
ok 1 number(s): "371368"
Test #58:
score: 0
Accepted
time: 319ms
memory: 67312kb
input:
936 739 //\\/\\/\//\\\\\/\\\//\/\/\/\/\//\\//\///\\\/\///\//\\\/\\\/\\\/\/\\\//\\\\/\/\//\//\/\\/\\///\///\///\\/\//\/\\\/\\//\\/\\/\\\\\\\\///\\////\//\\/\\\\//\////\\/\\\\//////////\\\/\/\\/\\//\\\//\\/\/\/\/\///\/\\\/\\\/\//////\//\\///\/\\/\\//\\\/\//\/\/\\\\\////\/\/////\\//\\\\\/\////\/\///\/\...
output:
11934107
result:
ok 1 number(s): "11934107"
Test #59:
score: 0
Accepted
time: 300ms
memory: 67608kb
input:
676 944 /\\\/\/\///\/\\/\/\\\/\//\/\\///\/\\\\\\/\\///\/\\\\\//\\//\\/\\/\////\/\/\/\/\///\//\//////\\\\\/\\\\\\\\///\\/\/\\//\\/\\\\//\//\///\//\//\///\\\/\\///\/\\\///\/\/\\\\\/\//\//\///\///\\\\///\\/\//\\/\\\/\/\\\\\\//\/\\////\\//\\//\/\\//\\////\///\\\/\\/\////\\/\\/\/\/\\\\/\////////\//\\/\\\...
output:
10930726
result:
ok 1 number(s): "10930726"
Test #60:
score: 0
Accepted
time: 107ms
memory: 22812kb
input:
365 718 /\\\\\\/\/\\\////\\////\/\//\\\\/\//\/\\/\///\\/\/////\/\/\//\\////\///\\/\/\\\\\/\///\\////\/\//\\//\///\\/\\///\/\//\\/\\\//\/\//\\/\\\\/\////\//\\\//////\\\/\\///\/\\\\\//\\\\//\//\\//\\/////\//////\\//\/////\/\/\/\/\//\\\\\\\/\/\\/\\\/////\\/\///\/\\/\\///\/\////\\\\\//\/\/\//\\/\/\\//\\...
output:
4489005
result:
ok 1 number(s): "4489005"
Test #61:
score: 0
Accepted
time: 304ms
memory: 67372kb
input:
947 717 ////\\/\/\\\\\/\\/\\\\/\///\/\/\/\/\\\///\\///\/\\\\/\/\/\\///\\/\/\//\//\\\\/\\////\///\/\\\\\\\\\/\/\/\\//\//\/\////\\\//\//\/\\\///////\\\\//\/\\\\///\\\\//\/\\/\/\//\/\/////\\\/\\/\\//\/\/\/\\\//\//\\/\/\\\////////\\\/\\\\/\\\//\//\//\\/\////////\\\//\////\/\\\\///\///\\//////\\/\\\\/\\\...
output:
11690504
result:
ok 1 number(s): "11690504"
Test #62:
score: 0
Accepted
time: 239ms
memory: 64756kb
input:
579 909 ////\///\\\\/\//\\///\/\\\\\/\\/\/\//\///\/\/\////////\////\/\\/\/\////\//\\/\\\/\\/\\\\\//\\/\//\\\///\//////\\//\/\\\\\//\/\/////\\/\\/\\////\\/\/\//\/\\\/\/\\\/\\////\/\//\/\/\\///\/\\/\/\/////////\\\///\///\//\\\////\//\/\//\\//\/\/\//\\/\\\/\/\\\\\\\/\//\\/\/\//\\\/\\\\/\/\/\\\//////\/\...
output:
9049328
result:
ok 1 number(s): "9049328"
Test #63:
score: 0
Accepted
time: 351ms
memory: 69632kb
input:
964 834 /\/\//\\\/\\\//////\\\/\\/\//\///\\\///\/\/\\\///\\\/////\\///\\\\\\\//////\///\\\\/////\//\\\\\\/\/\\/\//\/\/\/\///\\\\///\/\\/\\\///\/\/\\///\///\\/\\//\//\\/\//\\\\\//\///\\//\/\\/////\\\\\\\////\\\/\\//\/\\\\\/\//\\/\//\//\/\/\\/\\//\\/\\\\/////\\/\/\\\//\\\\\\\///\\\\\\/\///\/\//\/////\...
output:
13731326
result:
ok 1 number(s): "13731326"
Test #64:
score: 0
Accepted
time: 364ms
memory: 70908kb
input:
825 990 ///\///////\//\\\\////\\/\\\//\\////\\\\/\\\\////\///\\\///\\\\\\/\\\/\\/\///\/\\\/\/\\/\\\\//\///\//\\/\////\//\\//\\/////\\\/\\\//\//\//\\\\/\/\\\\/\\/\\\//////\//\/\\/\/////\/\///\\\/\\/\/\/\\\\/\//\\///\\//\\\\\\/\\\//\\\///\//\/\/\\\//\\\/\/////\\//\\////\\\////\\\\///\\//\\\/\//\/\/\/\...
output:
13983189
result:
ok 1 number(s): "13983189"
Test #65:
score: 0
Accepted
time: 337ms
memory: 67940kb
input:
899 795 \/\//\\\\\/\/\\/////\/\\///////\\\/\\\\//\/\\\\/\//\\/\//\//\/\//\\/\\///\/////\//\\\\/\/\/\//\/\\\\\///////\\/\\/\/\\///\\/\/\\///\\////\\//////\//\/\\/\\\\//\\/////\\\/////\\//\\/\\\\\///\/\\///\/\\//\\/\///\//\/////////\/\/\/////\\\\/\\////\//\\\\\\/\//\/\\\\/\/\/////\//\\\//\//\/\//\/\/\...
output:
12265090
result:
ok 1 number(s): "12265090"
Test #66:
score: 0
Accepted
time: 383ms
memory: 69992kb
input:
841 951 \\\/\\\//\//\\\/\\\\/\\\/\/\//\\/\\//////\//\/\/\\\/\//\\\\\\\\\/\/\\\\\/////\////\\\/\//\\\/\\\/\\//\/\\/\///\///\\/\//\\\/\/\\\\\///\\\/\/\\\//\\\\//\////\\\/\//\\///\\\/////\/\\\////\/\//\\///\////\\\\/\/\\//\/\////\/\\//\\/\/\\/\/\/\//\/\/\\//\/\/////\\/\\\\/////\\//\\\\\/\\\/\\\\\\\//\\...
output:
13682714
result:
ok 1 number(s): "13682714"
Test #67:
score: 0
Accepted
time: 364ms
memory: 69156kb
input:
847 910 \\/\\\\////\/\///\\/\///\////\/\/\/\////////\/\\\\\\\\\//\//\\\\///\//\/\/\//\/\\\//////\\\\/////\\///\//\/\\\\/\\\/\\\\////\////////\//\\\//\\\\\/\\/\/\/\//\///\/\\\/\\////\\//\\\//\/\/\//\//\\\/\///\\//\/\\\/\///\/\/\\///\/\\///\\\\//\\\\/\\/////\\\///\/\\\\/\\/\////\/\\/\\\\\\//\////\\\/\...
output:
13289629
result:
ok 1 number(s): "13289629"
Test #68:
score: 0
Accepted
time: 289ms
memory: 67056kb
input:
936 739 /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\...
output:
92173735
result:
ok 1 number(s): "92173735"
Extra Test:
score: 0
Extra Test Passed