QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#527676 | #1142. Fountain Parks | jamjanek | 0 | 287ms | 31052kb | C++20 | 829b | 2024-08-22 18:11:24 | 2024-08-22 18:11:25 |
Judging History
answer
#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
map<pair<int,int>,int>mapa;
int roza[4][2] = {{0,-2}, {0,2}, {-2,0}, {2,0}};
int construct_roads(vector<int> x, vector<int> y) {
int n = x.size(), i;
vector<int>a,b,u,v;
for(i=0;i<n;i++){
mapa[{x[i],y[i]}]=i;
for(auto j: roza){
if(mapa.find({x[i]+j[0], y[i]+j[1]})!=mapa.end()){
u.push_back(mapa[{x[i]+j[0], y[i]+j[1]}]);
v.push_back(i);
int A = x[i]+j[0]/2, B = y[i]+j[1]/2;
//printf("%d %d\n", A, B);
if(j[1]==0){
if((A+B)%4==1)
a.push_back(A),b.push_back(B+1);
else
a.push_back(A),b.push_back(B-1);
}
else{
if((A+B)%4==1)
a.push_back(A-1),b.push_back(B);
else
a.push_back(A+1),b.push_back(B);
}
}
}
}
build(u,v,a,b);
return 1;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 5
Accepted
time: 0ms
memory: 4136kb
input:
ba73dbf9c7d5e5202834d6a500541c 1 2 2
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 0
result:
ok
Test #2:
score: 5
Accepted
time: 0ms
memory: 3836kb
input:
ba73dbf9c7d5e5202834d6a500541c 2 2 2 2 4
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 1 0 1 1 3
result:
ok
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 3836kb
input:
ba73dbf9c7d5e5202834d6a500541c 2 2 2 2 6
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 0
result:
wrong answer Given structure is not connected: There is no path between vertices 0 and 1
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Wrong Answer
Test #82:
score: 20
Accepted
time: 0ms
memory: 4116kb
input:
ba73dbf9c7d5e5202834d6a500541c 3 200000 2 200000 4 199998 2
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 2 0 1 200001 3 0 2 199999 3
result:
ok
Test #83:
score: 20
Accepted
time: 0ms
memory: 3860kb
input:
ba73dbf9c7d5e5202834d6a500541c 3 200000 200000 200000 199998 199998 200000
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 2 0 1 200001 199999 0 2 199999 199999
result:
ok
Test #84:
score: 0
Wrong Answer
time: 0ms
memory: 3832kb
input:
ba73dbf9c7d5e5202834d6a500541c 12 2 2 2 4 4 2 2 200000 2 199998 4 200000 200000 2 200000 4 199998 2 200000 200000 200000 199998 199998 200000
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 8 0 1 1 3 0 2 3 3 3 4 1 199999 3 5 3 199999 6 7 200001 3 6 8 199999 3 9 10 200001 199999 9 11 199999 199999
result:
wrong answer Given structure is not connected: There is no path between vertices 0 and 3
Subtask #5:
score: 0
Wrong Answer
Test #108:
score: 20
Accepted
time: 219ms
memory: 28196kb
input:
ba73dbf9c7d5e5202834d6a500541c 200000 82422 100002 100002 52498 82816 2 97624 2 100002 58032 20638 100002 100002 7646 80512 2 2 10584 28426 100002 2 83036 2 64556 47872 100002 55196 2 85350 100002 2 95376 2 23942 12488 100002 83178 2 2 9086 85598 2 100002 78820 100002 10868 98810 2 84182 100002 2 71...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 200000 12 171 47873 100001 134 253 18709 1 223 411 9123 100003 246 647 100003 5377 646 816 100003 37161 334 885 3 24241 870 1171 61607 100003 397 1233 1 31579 724 1350 100001 79431 1264 1448 100001 67571 551 1501 100001 82979 389 1585 100001 73687 888 16...
result:
ok
Test #109:
score: 20
Accepted
time: 211ms
memory: 28200kb
input:
ba73dbf9c7d5e5202834d6a500541c 199999 10674 50002 7228 2 31566 50002 48790 2 87212 50002 100002 76172 54282 100002 2 33136 100002 78564 50002 9882 50848 50002 50002 83692 92422 100002 100002 78880 100002 71432 50002 65586 3750 2 50002 11898 50002 17296 50002 44774 3836 2 49936 50002 50002 48536 1542...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 200000 609 807 26575 50003 797 891 3 24181 834 995 50001 11731 881 1043 50001 98319 1141 1220 90523 50003 193 1309 100003 68293 989 1348 95905 100001 1153 1350 68885 100001 1040 1432 3 11005 1387 1464 100001 80115 1397 1488 3 41417 760 1513 100003 88205 ...
result:
ok
Test #110:
score: 20
Accepted
time: 240ms
memory: 28332kb
input:
ba73dbf9c7d5e5202834d6a500541c 199996 47612 97612 29284 20722 30860 80858 2350 52348 49558 99558 33234 83232 9050 59048 92420 57584 4174 54172 42730 92728 72144 77860 69182 19182 77286 72716 43440 6566 57918 7918 35822 85822 24864 25142 87024 37024 96744 46746 29472 79472 28650 78648 26748 76746 253...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 199996 280 301 66641 83361 481 657 58567 8569 761 790 46073 3931 79 1379 38417 88415 781 1401 27599 77597 465 1411 41627 91625 924 1427 59909 9911 1248 1427 59911 9911 847 1519 77127 27129 789 1683 44329 5675 1074 1738 7059 42947 1388 1812 99025 49027 17...
result:
ok
Test #111:
score: 20
Accepted
time: 287ms
memory: 31052kb
input:
ba73dbf9c7d5e5202834d6a500541c 196096 266 878 52 818 34 890 674 450 960 390 446 622 224 138 794 360 22 436 234 760 126 336 454 434 672 386 286 36 94 134 736 774 782 752 1014 692 228 594 778 878 550 1008 246 732 588 250 982 460 786 76 342 404 2 68 58 174 230 282 604 358 700 438 274 156 94 324 706 948...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 261120 559 665 711 591 164 684 157 841 417 764 689 667 357 835 789 115 576 864 505 349 558 908 533 929 778 1097 339 863 593 1129 329 323 571 1139 29 351 414 1264 231 191 589 1307 809 47 308 1360 117 37 1122 1409 727 259 1217 1436 353 405 824 1543 607 939...
result:
ok
Test #112:
score: 20
Accepted
time: 230ms
memory: 26152kb
input:
ba73dbf9c7d5e5202834d6a500541c 175280 382 334 666 902 752 406 992 1306 1252 256 252 422 762 1018 72 210 1078 102 478 1182 1392 68 942 530 180 252 152 1176 2 594 52 182 522 1032 482 1386 242 260 242 276 112 572 782 138 762 1034 532 586 222 160 232 236 914 392 172 1006 612 1258 1170 832 1236 992 1370 ...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 194600 632 725 155 983 116 729 1101 819 559 780 543 721 89 812 441 61 658 842 1091 137 586 872 73 311 351 953 1187 771 707 1042 1023 1261 676 1107 671 1049 572 1108 411 823 389 1141 281 1367 728 1157 147 1291 1086 1166 1375 223 1176 1303 743 877 1334 144...
result:
ok
Test #113:
score: 20
Accepted
time: 0ms
memory: 3828kb
input:
ba73dbf9c7d5e5202834d6a500541c 7 183572 142078 183572 142080 183568 142076 183574 142078 183574 142076 183568 142078 183570 142078
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 6 0 1 183573 142079 0 3 183573 142077 3 4 183575 142077 2 5 183567 142077 5 6 183569 142077 0 6 183571 142079
result:
ok
Test #114:
score: 20
Accepted
time: 29ms
memory: 7452kb
input:
ba73dbf9c7d5e5202834d6a500541c 31065 186080 21286 185980 21532 185748 21002 185714 21252 185436 20722 186236 21564 185932 21236 185414 20700 185944 21578 185658 20936 185856 21540 186034 21122 186020 21492 186014 21310 185282 20638 185482 20878 185224 20682 185670 21264 186032 21510 186004 21112 185...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 34451 110 112 185931 21277 76 143 185621 21381 267 315 185175 20675 33 316 185671 21371 179 334 185281 20735 171 355 185937 21277 358 493 185463 20795 444 542 185555 21371 473 572 185927 21377 104 586 185243 20599 121 636 185835 21385 12 684 186019 21493...
result:
ok
Test #115:
score: 0
Wrong Answer
time: 22ms
memory: 6092kb
input:
ba73dbf9c7d5e5202834d6a500541c 20000 70262 161716 35896 78638 36020 78778 35780 78778 70374 161892 35858 78838 35908 78680 70376 161802 35886 78784 35858 78886 70436 161842 35884 78716 36030 78752 70344 161912 70270 161766 35868 78870 70276 161828 35806 78664 70330 161764 35978 78806 35850 78718 703...
output:
3kr2yac8xnf3ktgcoqviaw115df6rra7is6p5uix OK 1 23792 11 112 35883 78717 84 150 35989 78865 100 194 70367 161739 61 262 35963 78895 181 295 35939 78859 304 330 70303 161855 342 346 35821 78759 182 346 35821 78757 355 395 35815 78691 135 426 70219 161845 324 443 35851 78715 71 446 70399 161903 21 447 7...
result:
wrong answer Given structure is not connected: There is no path between vertices 0 and 1
Subtask #6:
score: 0
Skipped
Dependency #1:
0%