QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#584290 | #8270. Mineral deposits | hansiyuan | 44 | 454ms | 13408kb | C++14 | 2.1kb | 2024-09-23 11:24:13 | 2024-09-23 11:24:14 |
Judging History
answer
#include <bits/stdc++.h>
#define pii pair<int,int>
#define X first
#define Y second
using namespace std;
const int bor = 1e8;
const int N=1e6+5;
int b,k,w,d;
int D[N];
set<pii> ta;
vector<pii> a;
set<int> s,key;
vector<pii> ques;
multiset<int> res;
int dis[N];
int Dis(pii u,pii v){
return abs(u.X-v.X)+abs(u.Y-v.Y);
}
bool chk(int i,int dx,int dy){
pii u = a[i];
pii p = {u.X+dx,u.Y+dy};
int dt = Dis(u,p);
if(p.X < -bor || p.X > bor || p.Y < -bor || p.Y > bor) return false;
for(int j=0;j<a.size();j++){
pii v = a[j];
// if(i<j && Dis(v,p)==dt) printf("%d %d %d %d %d %d %d\n",dt,u.X,u.Y,v.X,v.Y,p.X,p.Y);
if(key.count(Dis(v,p)) || i<j&&Dis(v,p)==dt) return false;
}
//printf("%d %d\n",p.X,p.Y);
key.insert(dt);
for(int j=0;j<a.size();j++)
s.insert(Dis(a[j],p));
ques.push_back(p);
return true;
}
int main(){
scanf("%d%d%d",&b,&k,&w);
printf("? %d %d %d %d\n",-b,-b,-b,b);
fflush(stdout);
for(int i=1;i<=k*2;i++)
scanf("%d",&D[i]);
for(int i=1;i<=k*2;i++)
for(int j=1;j<=k*2;j++){
ta.insert({(D[i]+D[j])/2-b*2,(D[i]-D[j])/2});
}
while(ta.size()){
pii p = *ta.begin();
ta.erase(p);
if(p.X < -b || p.X > b || p.Y < -b || p.Y > b) continue;
a.push_back(p);
// printf("%d %d\n",p.X,p.Y);
}
for(int i=0;i<a.size();i++){
pii p = a[i];
while(s.count(d) || (!chk(i,-d,0) && !chk(i,d,0) && !chk(i,0,-d) && !chk(i,0,d)))
d++;
dis[i] = d;
}
printf("? ");
for(pii p:ques) printf("%d %d ",p.X,p.Y);
puts(""); fflush(stdout);
for(int i=1;i<=ques.size()*k;i++){
int x; scanf("%d",&x);
res.insert(x);
}
printf("! ");
for(int i=0;i<a.size();i++){
pii u = a[i];
if(res.find(dis[i])!=res.end()){
printf("%d %d ",u.X,u.Y);
for(pii q:ques){
res.erase(Dis(u,q));
}
}
}
fflush(stdout);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 9
Accepted
Test #1:
score: 9
Accepted
time: 0ms
memory: 5932kb
input:
10 1 10000 20 30 2 7 10 11
output:
? -10 -10 -10 10 ? 0 0 4 -5 3 5 7 0 ! 5 5
result:
ok correct answer
Test #2:
score: 9
Accepted
time: 0ms
memory: 5816kb
input:
10 1 10000 28 30 2 3 4 5
output:
? -10 -10 -10 10 ? 8 0 8 -1 5 1 5 0 ! 9 1
result:
ok correct answer
Test #3:
score: 9
Accepted
time: 1ms
memory: 5936kb
input:
10 1 10000 13 29 2 13 16 17
output:
? -10 -10 -10 10 ? -7 0 0 -8 -1 8 6 0 ! 1 8
result:
ok correct answer
Test #4:
score: 9
Accepted
time: 0ms
memory: 5940kb
input:
10 1 10000 20 20 0
output:
? -10 -10 -10 10 ? 0 0 ! 0 0
result:
ok correct answer
Test #5:
score: 9
Accepted
time: 0ms
memory: 5912kb
input:
10 1 10000 30 30 0
output:
? -10 -10 -10 10 ? 10 0 ! 10 0
result:
ok correct answer
Test #6:
score: 9
Accepted
time: 0ms
memory: 5956kb
input:
10 1 10000 10 30 2 17 20 21
output:
? -10 -10 -10 10 ? -10 0 -1 -10 -2 10 7 0 ! 0 10
result:
ok correct answer
Test #7:
score: 9
Accepted
time: 1ms
memory: 5812kb
input:
10 1 10000 20 40 2 20 21
output:
? -10 -10 -10 10 ? 0 0 9 -10 8 10 ! 10 10
result:
ok correct answer
Test #8:
score: 9
Accepted
time: 1ms
memory: 5948kb
input:
100000000 1 10000 165772754 332220904 1 166448150 166448152
output:
? -100000000 -100000000 -100000000 100000000 ? -34227246 0 48996828 -83224075 48996827 83224075 ! 48996829 -83224075
result:
ok correct answer
Test #9:
score: 9
Accepted
time: 0ms
memory: 5948kb
input:
100000000 1 10000 120187009 222454927 2 102267915 102267918 102267919
output:
? -100000000 -100000000 -100000000 100000000 ? -79812991 0 -28679033 -51133959 -28679034 51133959 22454924 0 ! -28679032 51133959
result:
ok correct answer
Test #10:
score: 9
Accepted
time: 0ms
memory: 5856kb
input:
100000000 1 10000 200000000 400000000 2 200000000 200000001
output:
? -100000000 -100000000 -100000000 100000000 ? 0 0 99999999 -100000000 99999998 100000000 ! 100000000 100000000
result:
ok correct answer
Test #11:
score: 9
Accepted
time: 1ms
memory: 5928kb
input:
100000000 1 10000 200000000 400000000 1 200000000 200000002
output:
? -100000000 -100000000 -100000000 100000000 ? 0 0 99999999 -100000000 99999998 100000000 ! 100000000 -100000000
result:
ok correct answer
Test #12:
score: 9
Accepted
time: 1ms
memory: 5852kb
input:
100000000 1 10000 0 200000000 1 199999998 200000000
output:
? -100000000 -100000000 -100000000 100000000 ? -100000000 -100000000 -99999999 100000000 -2 0 ! -100000000 100000000
result:
ok correct answer
Test #13:
score: 9
Accepted
time: 1ms
memory: 5992kb
input:
100000000 1 10000 0 200000000 0 199999998 200000001
output:
? -100000000 -100000000 -100000000 100000000 ? -100000000 -100000000 -99999999 100000000 -2 0 ! -100000000 -100000000
result:
ok correct answer
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #14:
score: 19
Accepted
time: 0ms
memory: 5812kb
input:
10 1 10000 20 30 2 7 10 11
output:
? -10 -10 -10 10 ? 0 0 4 -5 3 5 7 0 ! 5 5
result:
ok correct answer
Test #15:
score: 19
Accepted
time: 1ms
memory: 5936kb
input:
10 1 10000 28 30 2 3 4 5
output:
? -10 -10 -10 10 ? 8 0 8 -1 5 1 5 0 ! 9 1
result:
ok correct answer
Test #16:
score: 19
Accepted
time: 1ms
memory: 5884kb
input:
10 1 10000 13 29 2 13 16 17
output:
? -10 -10 -10 10 ? -7 0 0 -8 -1 8 6 0 ! 1 8
result:
ok correct answer
Test #17:
score: 19
Accepted
time: 1ms
memory: 5932kb
input:
10 1 10000 20 20 0
output:
? -10 -10 -10 10 ? 0 0 ! 0 0
result:
ok correct answer
Test #18:
score: 19
Accepted
time: 1ms
memory: 5852kb
input:
10 1 10000 30 30 0
output:
? -10 -10 -10 10 ? 10 0 ! 10 0
result:
ok correct answer
Test #19:
score: 19
Accepted
time: 1ms
memory: 5948kb
input:
10 1 10000 10 30 2 17 20 21
output:
? -10 -10 -10 10 ? -10 0 -1 -10 -2 10 7 0 ! 0 10
result:
ok correct answer
Test #20:
score: 19
Accepted
time: 1ms
memory: 5984kb
input:
10 1 10000 20 40 2 20 21
output:
? -10 -10 -10 10 ? 0 0 9 -10 8 10 ! 10 10
result:
ok correct answer
Test #21:
score: 19
Accepted
time: 1ms
memory: 5992kb
input:
100000000 1 10000 165772754 332220904 1 166448150 166448152
output:
? -100000000 -100000000 -100000000 100000000 ? -34227246 0 48996828 -83224075 48996827 83224075 ! 48996829 -83224075
result:
ok correct answer
Test #22:
score: 19
Accepted
time: 0ms
memory: 5932kb
input:
100000000 1 10000 120187009 222454927 2 102267915 102267918 102267919
output:
? -100000000 -100000000 -100000000 100000000 ? -79812991 0 -28679033 -51133959 -28679034 51133959 22454924 0 ! -28679032 51133959
result:
ok correct answer
Test #23:
score: 19
Accepted
time: 1ms
memory: 5856kb
input:
100000000 1 10000 200000000 400000000 2 200000000 200000001
output:
? -100000000 -100000000 -100000000 100000000 ? 0 0 99999999 -100000000 99999998 100000000 ! 100000000 100000000
result:
ok correct answer
Test #24:
score: 19
Accepted
time: 1ms
memory: 5812kb
input:
100000000 1 10000 200000000 400000000 1 200000000 200000002
output:
? -100000000 -100000000 -100000000 100000000 ? 0 0 99999999 -100000000 99999998 100000000 ! 100000000 -100000000
result:
ok correct answer
Test #25:
score: 19
Accepted
time: 1ms
memory: 5888kb
input:
100000000 1 10000 0 200000000 1 199999998 200000000
output:
? -100000000 -100000000 -100000000 100000000 ? -100000000 -100000000 -99999999 100000000 -2 0 ! -100000000 100000000
result:
ok correct answer
Test #26:
score: 19
Accepted
time: 1ms
memory: 5812kb
input:
100000000 1 10000 0 200000000 0 199999998 200000001
output:
? -100000000 -100000000 -100000000 100000000 ? -100000000 -100000000 -99999999 100000000 -2 0 ! -100000000 -100000000
result:
ok correct answer
Test #27:
score: 19
Accepted
time: 1ms
memory: 5948kb
input:
100 3 500 42 135 221 229 242 313 5 12 14 16 18 22 23 24 47 52 57 58 58 61 62 64 65 67 68 71 79 81 82 83 93 95 97 98 99 99 103 105 106 107 107 110 110 113 113 114 116 116 117 117 120 121 126 131 140 145 150 151 151 154 154 155 155 158 161 164 168 168 174 179 180 181 183 184 186 188 188 190 191 192 19...
output:
? -100 -100 -100 100 ? -69 -89 -70 89 -67 -93 -68 0 -69 93 -63 -100 -65 100 -32 -43 -33 43 -30 -47 -31 47 -26 -53 -32 53 0 0 -2 -89 -3 89 -3 -4 -7 4 -4 0 -3 -10 -4 10 -2 -6 -3 6 -18 0 4 -46 67 110 1 -42 145 42 154 -35 155 35 ! -58 -100 -18 -47 67 46
result:
ok correct answer
Test #28:
score: 19
Accepted
time: 1ms
memory: 6032kb
input:
100 4 500 159 175 211 224 232 248 329 348 5 7 9 11 21 38 39 39 44 45 52 52 53 56 58 62 65 71 74 76 77 79 82 83 85 86 86 89 91 92 94 96 97 100 106 107 108 109 109 113 119 123 123 124 127 127 128 131 134 134 135 137 139 141 142 144 144 145 145 151 152 153 156 157 157 162 166 167 170 171 171 174 174 17...
output:
? -100 -100 -100 100 ? -41 0 -34 -8 -35 8 -28 0 -19 -26 -20 26 -15 -32 -16 32 -15 -18 -16 18 -15 -36 -16 36 -1 -12 -34 24 -31 -44 -32 -28 -52 28 -82 44 -76 -36 -86 0 -91 36 -102 -6 -103 6 -103 -10 -108 10 -123 0 -136 -4 -169 4 -172 -18 -181 18 -184 0 -183 -12 -203 12 -209 -8 -232 8 -232 -85 -233 85 ...
result:
ok correct answer
Test #29:
score: 19
Accepted
time: 1ms
memory: 5992kb
input:
100 5 500 39 57 147 169 185 226 247 261 319 322 5 9 16 19 23 26 36 37 39 40 46 47 51 53 55 56 63 67 67 70 71 74 75 76 81 82 82 83 85 85 86 88 90 90 95 96 98 99 101 107 110 112 113 114 118 119 119 121 121 125 126 128 133 133 134 135 136 137 138 138 138 140 143 144 144 147 148 148 150 151 157 163 167 ...
output:
? -100 -100 -100 100 ? -98 -45 -99 45 -98 -65 -99 65 -92 -73 -93 73 -93 -56 -94 56 -87 -64 -88 64 -81 -93 -82 93 -76 -84 -83 84 -78 0 -76 -95 -11 95 -82 -11 -83 11 -85 -19 -86 19 -86 0 -92 -8 -105 8 -101 0 -102 -39 -130 39 -166 -50 -182 -28 -186 28 -236 50 -234 -57 -239 57 -239 -20 -241 20 -240 -39 ...
result:
ok correct answer
Test #30:
score: 19
Accepted
time: 3ms
memory: 6076kb
input:
100 6 500 85 98 119 150 157 165 171 225 254 264 270 290 8 9 13 17 20 24 31 34 37 38 39 41 42 44 46 49 52 55 56 61 66 70 70 72 73 74 76 79 81 84 85 88 90 93 96 97 100 106 108 109 112 118 119 127 129 129 130 131 134 141 145 147 148 150 151 151 152 156 158 161 166 167 169 169 170 173 175 176 176 177 18...
output:
? -100 -100 -100 100 ? -98 -17 -99 17 -94 -10 -95 10 -87 -32 -88 32 -87 0 -86 -36 -87 36 -76 -17 -143 26 -170 -40 -171 40 -170 -29 -172 29 -188 -43 -199 43 -200 -33 -285 33 -284 -36 -293 -15 -295 15 -307 36 -309 -19 -371 19 -377 -23 -384 23 -383 -26 -391 26 -425 0 -440 -3 -450 3 -481 -70 -482 70 -43...
result:
ok correct answer
Test #31:
score: 19
Accepted
time: 12ms
memory: 6264kb
input:
100 10 500 56 104 110 120 123 129 145 148 151 177 183 188 213 242 255 260 317 325 333 361 21 22 23 26 27 30 30 32 33 35 35 37 38 40 42 43 45 45 47 48 49 50 51 52 54 54 55 55 56 56 57 57 59 59 60 62 63 64 66 67 69 72 74 75 76 82 83 89 90 91 91 93 94 95 95 96 97 98 98 101 103 104 111 130 132 134 135 1...
output:
? -100 -100 -100 100 ? -100 -44 -101 44 -100 -46 -101 46 -105 -47 -106 47 -106 0 -104 -3 -105 3 -103 0 -102 -8 -103 8 -106 -9 -192 9 -210 -5 -294 5 -329 -60 -336 -12 -337 -6 -357 6 -373 12 -381 60 -423 -63 -433 -9 -438 9 -463 63 -479 0 -530 -1 -531 1 -568 -66 -604 66 -607 0 -607 -20 -652 -4 -681 4 -...
result:
ok correct answer
Test #32:
score: 19
Accepted
time: 242ms
memory: 9060kb
input:
100 20 500 45 68 69 76 77 109 122 131 138 147 149 153 159 172 177 177 183 185 195 204 205 209 210 212 243 245 249 267 270 281 283 285 287 291 298 306 326 331 337 357 19 22 26 26 40 45 50 53 53 56 63 66 76 79 80 82 83 85 85 86 89 90 91 103 104 106 109 110 111 112 113 114 115 115 115 116 117 118 118 1...
output:
? -100 -100 -100 100 ? -100 -31 -101 31 -100 -57 -101 57 -101 -35 -107 -34 -127 -27 -133 27 -350 34 -367 35 -372 -27 -398 27 -400 -39 -405 -31 -606 -30 -636 30 -639 31 -642 39 -655 -63 -660 -40 -691 -39 -718 39 -886 40 -911 63 -923 -40 -925 0 -936 40 -959 -42 -1032 42 -1044 -66 -1117 -42 -1126 -35 -...
result:
ok correct answer
Test #33:
score: 0
Wrong Answer
time: 150ms
memory: 8392kb
input:
100 20 500 15 18 64 102 109 110 112 114 114 135 140 144 148 159 162 168 171 176 177 179 188 195 198 201 201 205 217 217 230 230 242 280 294 302 305 308 317 326 334 341 3 15 19 22 43 44 48 49 50 57 59 64 66 69 70 71 78 79 82 85 86 87 88 91 91 92 92 93 95 96 98 98 100 100 101 101 101 103 103 107 108 1...
output:
? -100 -100 -100 100 ? -99 -86 -100 86 -100 -38 -103 0 -119 38 -97 -63 -124 85 -137 -40 -149 40 -149 -90 -153 -3 -178 3 -307 90 -318 -91 -335 -88 -389 -42 -398 -4 -477 4 -499 42 -516 88 -524 91 -539 -5 -559 5 -679 -93 -692 -90 -703 -6 -717 6 -721 90 -722 93 -859 -91 -886 0 -898 91 -936 -95 -945 -1 -...
result:
wrong answer your answer is incorrect
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 20
Accepted
Test #116:
score: 20
Accepted
time: 278ms
memory: 9204kb
input:
100 20 3 64 75 90 91 93 99 113 132 136 152 158 162 166 174 177 179 188 189 190 197 197 200 202 205 214 225 226 227 229 229 242 254 261 268 270 277 283 314 327 335 42 48 51 54 62 63 69 71 72 72 73 76 78 79 81 81 84 85 85 88 89 89 89 89 91 91 92 92 92 93 94 95 96 96 99 99 101 101 101 102 102 102 102 1...
output:
? -100 -100 -100 100 ? -100 -36 -101 36 -101 -11 -103 11 -104 -11 -107 11 -107 -28 -115 -10 -117 10 -130 28 -338 -30 -350 30 -351 -7 -362 7 -375 -44 -380 44 -428 -47 -506 -21 -556 -20 -607 20 -610 21 -659 47 -659 -19 -710 19 -721 -49 -799 -38 -851 -23 -864 -22 -868 0 -936 22 -964 23 -995 38 -1060 49...
result:
ok correct answer
Test #117:
score: 20
Accepted
time: 399ms
memory: 9900kb
input:
1000 20 3 964 1089 1359 1571 1585 1594 1625 1631 1645 1665 1672 1705 1741 1754 1768 1859 1935 1939 1964 1977 2041 2168 2287 2295 2332 2414 2435 2453 2542 2542 2605 2747 2765 2864 3017 3045 3299 3313 3329 3451 132 134 136 139 140 142 147 148 154 155 157 170 190 209 213 221 227 229 274 310 311 325 378...
output:
? -1000 -1000 -1000 1000 ? -974 -62 -975 62 -913 0 -842 -197 -843 197 -781 -135 -782 135 -740 -303 -741 303 -735 -310 -736 310 -732 -315 -733 315 -720 -330 -721 330 -720 -333 -721 333 -719 -340 -720 340 -716 -350 -719 350 -727 -354 -728 354 -723 -241 -728 241 -731 -370 -732 370 -737 -248 -742 248 -7...
result:
ok correct answer
Test #118:
score: 20
Accepted
time: 352ms
memory: 9856kb
input:
10000 20 3 6479 9805 10766 10788 11569 12094 12351 13452 13758 13798 13945 14393 17232 17430 18540 19463 19719 20823 21299 21454 21607 21702 22526 23985 24546 25217 26344 27075 27136 27308 28164 28210 28214 30417 30847 31478 31482 32364 36143 36803 61 72 92 153 199 228 230 237 264 266 341 380 393 40...
output:
? -10000 -10000 -10000 10000 ? -9882 -3639 -9883 3639 -9864 -3659 -9865 3659 -9792 -3733 -9793 3733 -9721 -480 -9722 480 -9712 -491 -9713 491 -9574 -3957 -9575 3957 -9325 -882 -9328 882 -9250 0 -9240 -11 -9241 11 -9193 0 -9071 -1144 -9072 1144 -8944 -1273 -8945 1273 -8857 -401 -8858 401 -8848 -390 -...
result:
ok correct answer
Test #119:
score: 20
Accepted
time: 428ms
memory: 9108kb
input:
10000 20 3 19882 19898 19924 19946 19970 19976 19994 19998 20008 20010 20014 20024 20028 20054 20056 20064 20066 20072 20124 20148 20654 20664 20670 20682 20700 20716 20722 20726 20736 20760 20784 20800 20830 20852 20868 20870 20910 20930 20946 20976 719 729 733 735 735 737 743 745 747 747 749 751 7...
output:
? -10000 -10000 -10000 10000 ? -118 0 -111 -8 -112 8 -105 0 -101 -21 -102 21 -95 -13 -96 13 -94 -32 -97 32 -90 -24 -103 24 -137 0 -136 -44 -141 44 -142 -47 -153 47 -232 -36 -262 36 -265 -11 -276 11 -278 -39 -281 39 -285 -56 -287 56 -286 -58 -318 58 -324 -63 -346 63 -353 -64 -356 -48 -377 0 -410 48 -...
result:
ok correct answer
Test #120:
score: 20
Accepted
time: 247ms
memory: 8788kb
input:
10000 20 3 27826 27888 27908 27912 27942 27944 27952 27980 27990 27998 28026 28034 28046 28060 28068 28086 28088 28118 28128 28182 29854 29900 29918 29936 29944 29948 29966 29974 29988 29996 30008 30014 30022 30050 30054 30072 30074 30092 30104 30158 1922 1924 1930 1948 1950 1951 1968 1968 1970 1976...
output:
? -10000 -10000 -10000 10000 ? 7826 0 7856 -31 7855 31 7864 -41 7863 41 7864 -43 7863 43 7875 -58 7874 58 7872 -59 7871 59 7873 0 7862 -63 7861 63 7869 -10 7868 10 7869 -12 7859 12 7833 -77 7826 77 7800 -82 7774 0 7759 82 7739 -2 7656 2 7630 -86 7629 0 7621 86 7616 -27 7581 27 7573 -28 7570 28 7572 ...
result:
ok correct answer
Test #121:
score: 20
Accepted
time: 434ms
memory: 9188kb
input:
10000 20 3 19874 19906 19916 19924 19946 19964 19976 19980 19984 19992 19996 20000 20004 20026 20032 20044 20056 20068 20086 20124 21428 21460 21530 21544 21546 21560 21572 21576 21586 21600 21620 21626 21632 21640 21660 21668 21708 21738 21744 21756 1497 1512 1516 1524 1529 1531 1534 1543 1544 1548...
output:
? -10000 -10000 -10000 10000 ? -126 0 -111 -16 -112 16 -108 -21 -109 21 -106 -25 -109 25 -103 0 -104 -36 -105 36 -110 -5 -111 5 -151 -9 -163 9 -249 0 -250 -45 -258 45 -268 -4 -280 4 -279 0 -281 -51 -282 51 -295 -20 -298 20 -305 -53 -320 53 -348 -55 -363 55 -375 -15 -395 15 -397 -59 -412 59 -413 -61 ...
result:
ok correct answer
Test #122:
score: 20
Accepted
time: 399ms
memory: 9232kb
input:
10000 20 3 12966 13018 13030 13032 13044 13076 13102 13112 13114 13124 13128 13130 13132 13154 13160 13164 13176 13216 13220 13230 28912 28914 28960 29040 29064 29066 29068 29074 29088 29094 29100 29122 29132 29140 29144 29152 29170 29188 29254 29270 5427 5431 5435 5441 5442 5447 5461 5462 5463 5467...
output:
? -10000 -10000 -10000 10000 ? -7034 0 -7009 -26 -7010 26 -7005 -32 -7006 32 -7008 -33 -7011 33 -7006 -39 -7007 39 -7002 0 -7000 -55 -7003 55 -7002 -6 -7005 6 -7005 -7 -7008 7 -7009 0 -7052 -13 -7087 -1 -7088 1 -7149 13 -7149 0 -7173 -68 -7189 68 -7193 -7 -7199 7 -7232 -6 -7242 6 -7244 -73 -7245 73 ...
result:
ok correct answer
Test #123:
score: 20
Accepted
time: 174ms
memory: 8684kb
input:
10000 20 3 19894 19938 19942 19944 19948 19952 19956 19962 19970 20002 20024 20026 20030 20050 20052 20110 20112 20126 20132 20164 37842 37858 37868 37884 37908 37948 37994 37998 38014 38024 38026 38036 38038 38048 38066 38088 38098 38114 38132 38134 320 350 352 358 372 374 382 388 402 404 432 434 4...
output:
? -10000 -10000 -10000 10000 ? -106 0 -85 -22 -86 22 -85 -24 -86 24 -102 -25 -103 25 -106 -27 -115 27 -114 -29 -115 29 -142 -31 -149 31 -191 -34 -195 34 -194 -38 -215 38 -211 0 -224 -2 -225 2 -323 -3 -339 3 -353 0 -357 -5 -368 -1 -373 1 -384 5 -396 0 -402 -7 -422 -3 -435 3 -456 7 -460 -2 -477 2 -495...
result:
ok correct answer
Test #124:
score: 20
Accepted
time: 29ms
memory: 7580kb
input:
10000 20 3 0 0 1066 2338 3000 3204 4952 5970 6018 6950 8940 9642 11364 13196 13982 14030 15048 16740 17000 17662 20000 20000 20000 20000 21066 21410 21698 21768 23204 26950 28940 29642 31364 33196 36740 38232 38302 38590 40000 40000 0 1 3 4 5 9 11 36 36 45 52 53 155 187 385 587 626 639 641 642 657 6...
output:
? -10000 -10000 -10000 10000 ? -10000 -10000 -10001 -7662 -10002 -7000 -10003 -5048 -10004 -4030 -10005 -3982 -10006 3982 -10007 4030 -10008 5048 -10009 7000 -10010 7662 -10011 10000 -9988 -4006 -9989 4006 -9941 -3123 -9942 3123 -9914 -6898 -9915 6898 -9866 -1212 -9867 1212 -9689 -7331 -9690 7331 -9...
result:
ok correct answer
Test #125:
score: 20
Accepted
time: 32ms
memory: 7496kb
input:
10000 20 3 0 0 2020 2266 4032 4552 8550 9344 10200 15136 15304 15338 15448 15968 17616 17772 18202 18460 18910 20000 20000 20000 20000 22020 22214 22266 28550 29344 30200 35136 35304 35338 37616 37772 37786 38202 38460 38910 40000 40000 0 1 2 5 60 70 95 118 129 176 180 184 188 226 253 261 297 306 30...
output:
? -10000 -10000 -10000 10000 ? -10000 -10000 -10001 -5968 -10002 -5448 -10003 5448 -10004 5968 -10005 10000 -9987 -7753 -9988 7753 -9897 -8091 -9898 8091 -9810 0 -9777 -7968 -9778 7968 -9773 -8220 -9774 8220 -9755 -5708 -9756 5708 -9654 -8097 -9655 8097 -9554 -8445 -9555 8445 -9433 -8322 -9434 8322 ...
result:
ok correct answer
Subtask #6:
score: 15
Accepted
Dependency #5:
100%
Accepted
Test #126:
score: 15
Accepted
time: 273ms
memory: 9136kb
input:
100 20 3 64 75 90 91 93 99 113 132 136 152 158 162 166 174 177 179 188 189 190 197 197 200 202 205 214 225 226 227 229 229 242 254 261 268 270 277 283 314 327 335 42 48 51 54 62 63 69 71 72 72 73 76 78 79 81 81 84 85 85 88 89 89 89 89 91 91 92 92 92 93 94 95 96 96 99 99 101 101 101 102 102 102 102 1...
output:
? -100 -100 -100 100 ? -100 -36 -101 36 -101 -11 -103 11 -104 -11 -107 11 -107 -28 -115 -10 -117 10 -130 28 -338 -30 -350 30 -351 -7 -362 7 -375 -44 -380 44 -428 -47 -506 -21 -556 -20 -607 20 -610 21 -659 47 -659 -19 -710 19 -721 -49 -799 -38 -851 -23 -864 -22 -868 0 -936 22 -964 23 -995 38 -1060 49...
result:
ok correct answer
Test #127:
score: 15
Accepted
time: 400ms
memory: 9780kb
input:
1000 20 3 964 1089 1359 1571 1585 1594 1625 1631 1645 1665 1672 1705 1741 1754 1768 1859 1935 1939 1964 1977 2041 2168 2287 2295 2332 2414 2435 2453 2542 2542 2605 2747 2765 2864 3017 3045 3299 3313 3329 3451 132 134 136 139 140 142 147 148 154 155 157 170 190 209 213 221 227 229 274 310 311 325 378...
output:
? -1000 -1000 -1000 1000 ? -974 -62 -975 62 -913 0 -842 -197 -843 197 -781 -135 -782 135 -740 -303 -741 303 -735 -310 -736 310 -732 -315 -733 315 -720 -330 -721 330 -720 -333 -721 333 -719 -340 -720 340 -716 -350 -719 350 -727 -354 -728 354 -723 -241 -728 241 -731 -370 -732 370 -737 -248 -742 248 -7...
result:
ok correct answer
Test #128:
score: 15
Accepted
time: 359ms
memory: 9896kb
input:
10000 20 3 6479 9805 10766 10788 11569 12094 12351 13452 13758 13798 13945 14393 17232 17430 18540 19463 19719 20823 21299 21454 21607 21702 22526 23985 24546 25217 26344 27075 27136 27308 28164 28210 28214 30417 30847 31478 31482 32364 36143 36803 61 72 92 153 199 228 230 237 264 266 341 380 393 40...
output:
? -10000 -10000 -10000 10000 ? -9882 -3639 -9883 3639 -9864 -3659 -9865 3659 -9792 -3733 -9793 3733 -9721 -480 -9722 480 -9712 -491 -9713 491 -9574 -3957 -9575 3957 -9325 -882 -9328 882 -9250 0 -9240 -11 -9241 11 -9193 0 -9071 -1144 -9072 1144 -8944 -1273 -8945 1273 -8857 -401 -8858 401 -8848 -390 -...
result:
ok correct answer
Test #129:
score: 15
Accepted
time: 425ms
memory: 9052kb
input:
10000 20 3 19882 19898 19924 19946 19970 19976 19994 19998 20008 20010 20014 20024 20028 20054 20056 20064 20066 20072 20124 20148 20654 20664 20670 20682 20700 20716 20722 20726 20736 20760 20784 20800 20830 20852 20868 20870 20910 20930 20946 20976 719 729 733 735 735 737 743 745 747 747 749 751 7...
output:
? -10000 -10000 -10000 10000 ? -118 0 -111 -8 -112 8 -105 0 -101 -21 -102 21 -95 -13 -96 13 -94 -32 -97 32 -90 -24 -103 24 -137 0 -136 -44 -141 44 -142 -47 -153 47 -232 -36 -262 36 -265 -11 -276 11 -278 -39 -281 39 -285 -56 -287 56 -286 -58 -318 58 -324 -63 -346 63 -353 -64 -356 -48 -377 0 -410 48 -...
result:
ok correct answer
Test #130:
score: 15
Accepted
time: 252ms
memory: 8656kb
input:
10000 20 3 27826 27888 27908 27912 27942 27944 27952 27980 27990 27998 28026 28034 28046 28060 28068 28086 28088 28118 28128 28182 29854 29900 29918 29936 29944 29948 29966 29974 29988 29996 30008 30014 30022 30050 30054 30072 30074 30092 30104 30158 1922 1924 1930 1948 1950 1951 1968 1968 1970 1976...
output:
? -10000 -10000 -10000 10000 ? 7826 0 7856 -31 7855 31 7864 -41 7863 41 7864 -43 7863 43 7875 -58 7874 58 7872 -59 7871 59 7873 0 7862 -63 7861 63 7869 -10 7868 10 7869 -12 7859 12 7833 -77 7826 77 7800 -82 7774 0 7759 82 7739 -2 7656 2 7630 -86 7629 0 7621 86 7616 -27 7581 27 7573 -28 7570 28 7572 ...
result:
ok correct answer
Test #131:
score: 15
Accepted
time: 436ms
memory: 9148kb
input:
10000 20 3 19874 19906 19916 19924 19946 19964 19976 19980 19984 19992 19996 20000 20004 20026 20032 20044 20056 20068 20086 20124 21428 21460 21530 21544 21546 21560 21572 21576 21586 21600 21620 21626 21632 21640 21660 21668 21708 21738 21744 21756 1497 1512 1516 1524 1529 1531 1534 1543 1544 1548...
output:
? -10000 -10000 -10000 10000 ? -126 0 -111 -16 -112 16 -108 -21 -109 21 -106 -25 -109 25 -103 0 -104 -36 -105 36 -110 -5 -111 5 -151 -9 -163 9 -249 0 -250 -45 -258 45 -268 -4 -280 4 -279 0 -281 -51 -282 51 -295 -20 -298 20 -305 -53 -320 53 -348 -55 -363 55 -375 -15 -395 15 -397 -59 -412 59 -413 -61 ...
result:
ok correct answer
Test #132:
score: 15
Accepted
time: 395ms
memory: 9244kb
input:
10000 20 3 12966 13018 13030 13032 13044 13076 13102 13112 13114 13124 13128 13130 13132 13154 13160 13164 13176 13216 13220 13230 28912 28914 28960 29040 29064 29066 29068 29074 29088 29094 29100 29122 29132 29140 29144 29152 29170 29188 29254 29270 5427 5431 5435 5441 5442 5447 5461 5462 5463 5467...
output:
? -10000 -10000 -10000 10000 ? -7034 0 -7009 -26 -7010 26 -7005 -32 -7006 32 -7008 -33 -7011 33 -7006 -39 -7007 39 -7002 0 -7000 -55 -7003 55 -7002 -6 -7005 6 -7005 -7 -7008 7 -7009 0 -7052 -13 -7087 -1 -7088 1 -7149 13 -7149 0 -7173 -68 -7189 68 -7193 -7 -7199 7 -7232 -6 -7242 6 -7244 -73 -7245 73 ...
result:
ok correct answer
Test #133:
score: 15
Accepted
time: 165ms
memory: 8612kb
input:
10000 20 3 19894 19938 19942 19944 19948 19952 19956 19962 19970 20002 20024 20026 20030 20050 20052 20110 20112 20126 20132 20164 37842 37858 37868 37884 37908 37948 37994 37998 38014 38024 38026 38036 38038 38048 38066 38088 38098 38114 38132 38134 320 350 352 358 372 374 382 388 402 404 432 434 4...
output:
? -10000 -10000 -10000 10000 ? -106 0 -85 -22 -86 22 -85 -24 -86 24 -102 -25 -103 25 -106 -27 -115 27 -114 -29 -115 29 -142 -31 -149 31 -191 -34 -195 34 -194 -38 -215 38 -211 0 -224 -2 -225 2 -323 -3 -339 3 -353 0 -357 -5 -368 -1 -373 1 -384 5 -396 0 -402 -7 -422 -3 -435 3 -456 7 -460 -2 -477 2 -495...
result:
ok correct answer
Test #134:
score: 15
Accepted
time: 33ms
memory: 7524kb
input:
10000 20 3 0 0 1066 2338 3000 3204 4952 5970 6018 6950 8940 9642 11364 13196 13982 14030 15048 16740 17000 17662 20000 20000 20000 20000 21066 21410 21698 21768 23204 26950 28940 29642 31364 33196 36740 38232 38302 38590 40000 40000 0 1 3 4 5 9 11 36 36 45 52 53 155 187 385 587 626 639 641 642 657 6...
output:
? -10000 -10000 -10000 10000 ? -10000 -10000 -10001 -7662 -10002 -7000 -10003 -5048 -10004 -4030 -10005 -3982 -10006 3982 -10007 4030 -10008 5048 -10009 7000 -10010 7662 -10011 10000 -9988 -4006 -9989 4006 -9941 -3123 -9942 3123 -9914 -6898 -9915 6898 -9866 -1212 -9867 1212 -9689 -7331 -9690 7331 -9...
result:
ok correct answer
Test #135:
score: 15
Accepted
time: 33ms
memory: 7596kb
input:
10000 20 3 0 0 2020 2266 4032 4552 8550 9344 10200 15136 15304 15338 15448 15968 17616 17772 18202 18460 18910 20000 20000 20000 20000 22020 22214 22266 28550 29344 30200 35136 35304 35338 37616 37772 37786 38202 38460 38910 40000 40000 0 1 2 5 60 70 95 118 129 176 180 184 188 226 253 261 297 306 30...
output:
? -10000 -10000 -10000 10000 ? -10000 -10000 -10001 -5968 -10002 -5448 -10003 5448 -10004 5968 -10005 10000 -9987 -7753 -9988 7753 -9897 -8091 -9898 8091 -9810 0 -9777 -7968 -9778 7968 -9773 -8220 -9774 8220 -9755 -5708 -9756 5708 -9654 -8097 -9655 8097 -9554 -8445 -9555 8445 -9433 -8322 -9434 8322 ...
result:
ok correct answer
Test #136:
score: 15
Accepted
time: 153ms
memory: 13408kb
input:
10000000 20 3 4746591 5735125 7711763 9440978 9745547 10692854 10992434 12525326 14753997 15409576 15775921 15937622 16651242 16702125 17659673 17662398 17835487 18358265 18446846 18630693 18723288 18986162 19499887 20131992 22626115 22717452 25128907 25443571 27110355 27407859 28004584 29209543 292...
output:
? -10000000 -10000000 -10000000 10000000 ? -9933084 -625938 -9933085 625938 -9921919 -5331492 -9921920 5331492 -9881460 -2406781 -9881461 2406781 -9783300 -775728 -9783301 775728 -9780808 -473653 -9780809 473653 -9755449 -4509436 -9755450 4509436 -9738756 -5514665 -9738757 5514665 -9657908 -5595515 ...
result:
ok correct answer
Test #137:
score: 15
Accepted
time: 438ms
memory: 9000kb
input:
10000000 20 3 19999840 19999858 19999870 19999890 19999896 19999906 19999910 19999918 19999936 19999938 19999950 19999958 19999996 20000010 20000022 20000030 20000044 20000060 20000146 20000148 20000630 20000682 20000710 20000716 20000722 20000742 20000752 20000768 20000780 20000786 20000790 2000079...
output:
? -10000000 -10000000 -10000000 10000000 ? -160 0 -152 -9 -153 9 -148 -15 -149 15 -147 0 -142 -6 -143 6 -145 -25 -150 25 -157 -28 -168 28 -171 0 -175 -33 -191 33 -241 -16 -243 16 -249 -35 -266 35 -271 -19 -299 19 -320 -39 -333 39 -333 -10 -370 10 -381 -24 -382 24 -389 -13 -416 13 -421 -26 -443 26 -4...
result:
ok correct answer
Test #138:
score: 15
Accepted
time: 448ms
memory: 9068kb
input:
10000000 20 3 20008844 20008872 20008874 20008880 20008890 20008920 20008924 20008958 20008992 20009010 20009012 20009016 20009020 20009028 20009034 20009038 20009048 20009098 20009102 20009116 20010876 20010884 20010886 20010932 20010942 20010954 20010956 20010958 20010984 20010996 20011020 2001103...
output:
? -10000000 -10000000 -10000000 10000000 ? 8844 0 8857 -14 8856 14 8854 -15 8853 15 8855 -18 8854 18 8854 -23 8853 23 8856 0 8834 -1 8833 1 8813 0 8814 -4 8813 4 8811 -3 8802 3 8801 0 8785 -9 8782 9 8782 -38 8774 -8 8769 8 8764 38 8753 -40 8752 40 8632 -5 8594 5 8595 0 8583 -24 8578 24 8578 -23 8570...
result:
ok correct answer
Test #139:
score: 15
Accepted
time: 454ms
memory: 9136kb
input:
10000000 20 3 19999812 19999850 19999858 19999868 19999910 19999922 19999930 19999954 19999994 19999996 20000006 20000026 20000036 20000038 20000040 20000068 20000108 20000114 20000126 20000160 20001474 20001500 20001526 20001528 20001540 20001556 20001562 20001564 20001586 20001592 20001616 2000161...
output:
? -10000000 -10000000 -10000000 10000000 ? -188 0 -170 -19 -171 19 -168 -23 -169 23 -166 -28 -167 28 -158 0 -161 -4 -163 4 -160 0 -163 -9 -165 9 -190 -49 -193 49 -202 -5 -222 5 -224 -55 -236 55 -247 0 -259 -59 -260 59 -256 -30 -322 30 -321 -71 -368 71 -377 -26 -452 26 -452 -36 -453 36 -453 -21 -474 ...
result:
ok correct answer
Test #140:
score: 15
Accepted
time: 317ms
memory: 9840kb
input:
10000000 20 3 19920962 19920970 19921000 19921002 19921010 19921034 19921042 19921048 19921086 19921098 19921100 19921102 19921112 19921120 19921122 19921132 19921142 19921156 19921222 19921256 20080958 20080990 20081010 20081022 20081032 20081042 20081066 20081074 20081104 20081106 20081112 2008111...
output:
? -10000000 -10000000 -10000000 10000000 ? -79038 0 -79035 -4 -79036 4 -79033 0 -79023 -19 -79030 19 -79033 -20 -79034 20 -79033 -15 -79044 15 -79044 -24 -79050 -16 -79071 16 -79099 24 -79102 -20 -79104 20 -79100 -36 -79107 36 -79192 0 -79211 -1 -79217 1 -79228 -40 -79230 -32 -79235 0 -79237 32 -792...
result:
ok correct answer
Test #141:
score: 15
Accepted
time: 336ms
memory: 9824kb
input:
10000000 20 3 19999808 19999896 19999910 19999916 19999924 19999932 19999960 19999982 19999986 20000014 20000016 20000018 20000024 20000026 20000034 20000048 20000072 20000120 20000124 20000136 21999822 21999852 21999888 21999916 21999920 21999932 21999940 21999942 21999972 21999998 22000004 2200001...
output:
? -10000000 -10000000 -10000000 10000000 ? -192 0 -149 -44 -150 44 -144 -51 -145 51 -143 -54 -144 54 -141 -58 -142 58 -142 -62 -149 62 -139 -76 -144 76 -136 -87 -137 87 -137 0 -142 -89 -145 89 -149 -7 -154 7 -154 -10 -172 10 -239 -14 -257 0 -343 14 -345 -103 -363 103 -381 -104 -387 104 -391 -105 -41...
result:
ok correct answer
Test #142:
score: 15
Accepted
time: 27ms
memory: 8328kb
input:
10000000 20 3 0 0 3830690 4350056 4556646 4713918 7201290 7602540 7810804 11116012 12189196 12397460 12798710 14268394 15649944 16169310 17835440 18381794 20000000 20000000 20000000 20000000 20732244 23051746 23577014 24556646 24713918 27916314 29316318 30683682 31116012 32083686 34268394 36422986 3...
output:
? -10000000 -10000000 -10000000 10000000 ? -10000000 -10000000 -10000001 -6169310 -10000002 -5649944 -10000003 -2798710 -10000004 -2397460 -10000005 -2189196 -10000006 2189196 -10000007 2397460 -10000008 2798710 -10000009 5649944 -10000010 6169310 -10000011 10000000 -9896717 -5546649 -9896718 554664...
result:
ok correct answer
Test #143:
score: 15
Accepted
time: 26ms
memory: 8396kb
input:
10000000 20 3 0 0 3295730 4879418 7857046 8454508 9366196 9396038 9970224 10603962 10633804 11316746 11545492 13763466 14732494 17009172 20000000 20000000 20000000 20000000 23295730 23841634 24207334 24879418 25588658 26857392 27857046 29040038 29970224 30959962 31316746 33142608 33763466 34411342 3...
output:
? -10000000 -10000000 -10000000 10000000 ? -10000000 -10000000 -10000001 -1545492 -10000002 -633804 -10000003 -603962 -10000004 603962 -10000005 633804 -10000006 1545492 -10000007 10000000 -9985087 -618883 -9985088 618883 -9847559 -6856721 -9847560 6856721 -9712919 -316869 -9712920 316869 -9698000 -...
result:
ok correct answer
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%