QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#85140 | #5235. Podwyżki [B] | anhduc2701 | 1 | 76ms | 36528kb | C++23 | 2.4kb | 2023-03-07 00:21:47 | 2023-03-07 00:21:51 |
Judging History
answer
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
*/
#include<bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define eb emplace_back
#define PI 3.14159265359
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define BIT(x,i) (1&((x)>>(i)))
#define MASK(x) (1LL<<(x))
#define task "tnc"
typedef long long ll;
const ll INF=1e18;
const int maxn=1e6+5;
const int mod=1e9+7;
const int mo=998244353;
using pi=pair<ll,ll>;
using vi=vector<ll>;
using pii=pair<pair<ll,ll>,ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n,k;
vector<int>vt;
vector<int>pos[maxn];
int ok[maxn];
int a[maxn];
int ok1[maxn];
int k1;
int suf[maxn];
int pre[maxn];
void case2(){
for(int i=1;i<n;i++){
if(pre[i]>=suf[i+1]){
cout<<"TAK\n";
cout<<i;
return;
}
}
cout<<"NIE\n";
}
void case3(){
int mi=a[1];
int cntmi=1;
int ma=a[1];
int cntma=1;
for(int i=2;i<=n;i++){
if(mi==a[i]){
cntmi++;
}
else if(mi>a[i]){
mi=a[i];
cntmi=1;
}
if(ma==a[i]){
cntma++;
}
else if(ma<a[i]){
ma=a[i];
cntma=1;
}
}
if(a[1]== mi && a[n]==ma && cntmi==1 && cntma==1){
cout<<"NIE\n";
return;
}
cout<<"TAK\n";
for(int i=2;i<n;i++){
if(a[i]== ma ||a[i]==mi ){
cout<<i-1<<" "<<i<<"\n";
return ;
}
}
return;
}
void case4(){
int check=0;
for(int i=1;i<n;i++){
if(a[i]>a[i+1]){
ok[i]=1;
ok[i-1]=1;
ok[i+1]=1;
k-=3;
check=1;
}
}
if(check==0){
cout<<"NIE\n";
return ;
}
if(ok[n]==0){
ok[n]=1;
k--;
}
for(int i=1;i<=n;i++){
if(ok[i]==0 && k>0){
ok[i]=1;
k--;
}
}
cout<<"TAK\n";
for(int i=1;i<n;i++){
if(ok[i])cout<<i<<" ";
}
}
signed main()
{
cin.tie(0),cout.tie(0)->sync_with_stdio(0);
//freopen(task".inp" , "r" , stdin);
//freopen(task".out" , "w" , stdout);
cin>>n>>k;
for(int i=1;i<=n;i++){
cin>>a[i];
vt.pb(a[i]);
}
suf[n]=a[n];
for(int i=n-1;i>=1;i--){
suf[i]=max(a[i],suf[i+1]);
}
pre[1]=a[1];
for(int i=2;i<=n;i++){
pre[i]=min(pre[i-1],a[i]);
}
if(k==2)case2();
else if(k==3)case3();
else case4();
return 0;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 1
Accepted
time: 1ms
memory: 27040kb
input:
20 3 500000006 500000017 500000029 500000035 500000043 500000059 500000193 500000072 500000086 500000093 500000102 500000113 500000128 500000138 500000148 500000156 500000161 500000176 500000185 500000193
output:
TAK 6 7
result:
ok good solution
Test #2:
score: 0
Accepted
time: 5ms
memory: 26848kb
input:
19 3 500000005 500000018 500000026 500000034 500000043 500000053 500000065 500000076 500000087 500000099 500000108 500000117 500000005 500000139 500000149 500000151 500000161 500000179 500000187
output:
TAK 12 13
result:
ok good solution
Test #3:
score: -1
Wrong Answer
time: 3ms
memory: 26860kb
input:
20 4 999999991 999999992 999999991 999999995 999999995 999999990 999999998 999999990 999999994 1000000000 999999994 999999994 999999995 999999993 999999990 999999991 999999991 999999994 999999994 999999991
output:
TAK 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 19
result:
wrong output format Extra information in the output file
Subtask #2:
score: 0
Wrong Answer
Test #15:
score: 1
Accepted
time: 1ms
memory: 26872kb
input:
513 3 500000008 500000018 500000028 500000031 500000049 500000057 500000068 500000073 500000088 500000096 500000109 500000117 500000121 500000135 500000149 500000155 500000162 500000175 500000183 500000193 500000206 500000215 500000221 500000239 500000244 500000256 500000265 500000279 500000289 5000...
output:
TAK 230 231
result:
ok good solution
Test #16:
score: 0
Accepted
time: 7ms
memory: 26820kb
input:
512 3 500000004 500000013 500000025 500000039 500000043 500000054 500000068 500000078 500000089 500000092 500000101 500000111 500000125 500000136 500000141 500000153 500000162 500000179 500000185 500000199 500000208 500000218 500000226 500000239 500000246 500000253 500000268 500000278 500000282 5000...
output:
TAK 428 429
result:
ok good solution
Test #17:
score: 0
Accepted
time: 3ms
memory: 26864kb
input:
500 3 3 2 2 1 2 2 3 3 2 2 3 3 1 2 3 1 1 1 1 3 2 2 1 3 2 2 2 3 3 2 1 1 3 1 3 1 1 2 3 2 2 2 2 3 1 1 3 3 2 2 3 3 1 2 3 3 3 3 3 2 2 2 2 2 2 1 1 2 2 1 1 2 1 1 3 1 1 2 2 3 3 3 1 1 1 1 1 1 1 3 2 2 2 1 3 2 2 2 2 1 2 3 1 2 1 2 1 1 2 3 1 3 1 2 2 3 3 1 3 1 3 3 3 3 1 2 3 1 1 3 3 1 1 3 3 2 3 3 3 3 3 1 1 2 2 2 3 ...
output:
TAK 3 4
result:
ok good solution
Test #18:
score: -1
Wrong Answer
time: 4ms
memory: 26888kb
input:
500 4 999999995 999999992 999999993 999999991 1000000000 999999999 999999997 999999999 999999994 999999994 999999998 999999993 999999999 999999999 999999995 999999994 999999996 999999995 999999990 999999997 1000000000 999999999 999999995 999999995 999999991 999999992 999999998 1000000000 1000000000 ...
output:
TAK 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 55 56 57 59 60 61 62 63 64 65 66 67 68 69 70 71 74 75 76 77 78 79 80 81 82 83 84 85 86 87 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 10...
result:
wrong output format Extra information in the output file
Subtask #3:
score: 0
Wrong Answer
Test #26:
score: 1
Accepted
time: 9ms
memory: 26956kb
input:
1025 3 5 15 24 38 48 55 66 72 90 100 105 120 126 132 149 158 164 179 187 192 206 217 223 235 245 258 266 276 286 297 308 317 322 339 349 354 365 379 384 398 410 414 423 433 442 455 469 480 484 495 506 520 526 533 546 556 565 580 587 599 607 617 628 634 646 658 667 675 686 700 709 714 729 740 744 760...
output:
TAK 312 313
result:
ok good solution
Test #27:
score: 0
Accepted
time: 4ms
memory: 27080kb
input:
2000 3 500000003 500000018 500000029 500000036 500000047 500000057 500000068 500000074 500000086 500000099 500000101 500000114 500000124 500000138 500000149 500000151 500000163 500000171 500000188 500000197 500000205 500000212 500000226 500000239 500000248 500000256 500000263 500000274 500000282 500...
output:
TAK 1472 1473
result:
ok good solution
Test #28:
score: 0
Accepted
time: 1ms
memory: 26932kb
input:
2000 3 2 3 2 1 2 1 2 3 2 1 1 3 2 2 3 2 1 2 1 3 3 2 3 1 3 2 3 1 1 3 1 3 3 1 3 1 3 1 2 1 1 2 1 2 3 3 1 2 3 3 2 3 3 2 3 3 1 2 2 3 3 3 3 3 3 1 2 2 2 3 3 2 1 1 1 1 3 3 1 1 1 2 2 2 2 1 1 1 1 3 2 1 3 3 2 3 2 2 3 1 3 2 3 2 2 2 3 3 3 1 2 3 3 2 3 1 2 1 2 3 2 2 1 3 2 1 1 1 1 3 2 2 3 1 3 2 1 2 2 1 1 1 1 3 1 2 2...
output:
TAK 1 2
result:
ok good solution
Test #29:
score: -1
Wrong Answer
time: 4ms
memory: 27004kb
input:
2000 4 999999993 999999991 999999995 999999996 1000000000 999999999 999999994 999999992 999999996 999999992 999999990 999999992 999999998 999999992 999999994 999999992 999999997 999999994 999999996 999999998 999999996 999999994 999999994 999999999 999999996 999999993 999999990 999999993 999999993 99...
output:
TAK 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 87 88 89 90 91 92 93 94 95 96 97 98 100 101 102 104 105...
result:
wrong output format Extra information in the output file
Subtask #4:
score: 0
Wrong Answer
Test #38:
score: 1
Accepted
time: 4ms
memory: 26872kb
input:
1024 3 9 15 30 37 45 58 69 78 84 97 108 112 122 140 148 154 166 176 185 195 208 213 227 235 243 252 264 274 284 299 310 317 325 338 348 359 364 375 384 400 410 419 425 439 448 459 468 477 487 498 504 516 525 538 549 558 563 574 583 594 602 613 622 634 648 658 668 674 686 697 702 713 728 738 742 754 ...
output:
TAK 858 859
result:
ok good solution
Test #39:
score: 0
Accepted
time: 1ms
memory: 27056kb
input:
2000 3 500000001 500000016 500000026 500000036 500000044 500000052 500000064 500000076 500000083 500000093 500000104 500000119 500000122 500000135 500000149 500000156 500000169 500000176 500000182 500000199 500000207 500000214 500000229 500000235 500000242 500000254 500000263 500000278 500000282 500...
output:
TAK 1452 1453
result:
ok good solution
Test #40:
score: 0
Accepted
time: 13ms
memory: 26948kb
input:
1023 3 3 1 3 1 1 2 3 3 3 3 3 2 3 1 2 2 2 1 3 1 1 2 1 1 3 3 3 3 2 2 1 2 1 1 1 3 1 2 1 2 2 3 2 3 3 2 2 2 1 3 2 1 2 2 2 3 2 1 2 3 1 1 1 1 1 3 1 2 3 2 3 1 3 1 3 3 3 2 2 1 3 1 2 3 1 2 2 1 2 3 1 3 2 1 2 2 2 3 2 3 1 2 1 1 3 2 1 2 1 3 3 2 1 3 1 2 2 2 1 3 3 2 2 3 3 2 3 3 1 1 2 1 1 2 3 3 1 2 3 1 2 3 3 3 3 1 1...
output:
TAK 1 2
result:
ok good solution
Test #41:
score: 0
Accepted
time: 4ms
memory: 26876kb
input:
2000 2 569858831 450911919 863304159 885312393 109683305 110364551 266840379 860043848 397780790 465717343 101092307 613324906 575484525 22329315 831790930 758295276 134402417 51539346 68434131 25519620 799961117 102110878 231917973 782986177 244847850 91945531 897107420 157212537 50003910 683767290...
output:
NIE
result:
ok no solution
Test #42:
score: -1
Wrong Answer
time: 8ms
memory: 27008kb
input:
2000 4 999999995 999999999 1000000000 999999998 999999992 999999992 999999996 999999995 999999999 999999994 999999992 999999991 999999996 999999996 999999992 999999991 999999991 999999996 999999997 999999997 999999998 999999997 999999998 999999997 999999994 999999998 999999999 999999991 999999999 10...
output:
TAK 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 100 101 102 103 105 106 107 108 109 110 111...
result:
wrong output format Extra information in the output file
Subtask #5:
score: 1
Accepted
Test #50:
score: 1
Accepted
time: 40ms
memory: 34376kb
input:
500000 2 96733 385679 36496 58364 157924 262087 114368 369679 399487 243135 300007 400425 143873 238383 376606 221831 362277 5424 143882 7322 83891 13321 464051 2125 317534 223350 355391 142109 446781 2753 377049 387945 57663 418272 16684 482728 300347 313882 41088 40295 38933 317354 168907 234092 2...
output:
NIE
result:
ok no solution
Test #51:
score: 0
Accepted
time: 60ms
memory: 34496kb
input:
500000 2 117389272 687154217 170919241 601221880 776757285 253352169 897265377 801718066 23223989 393553983 389363071 354656166 242297781 51907467 932025936 241442608 472378284 605075711 87145073 765793299 908330721 367947491 639266180 417184951 409818275 265875703 533223529 384404244 271797058 7634...
output:
NIE
result:
ok no solution
Test #52:
score: 0
Accepted
time: 36ms
memory: 34412kb
input:
500000 2 1 3 2 1 2 2 2 1 3 1 2 2 1 3 3 1 3 2 3 1 1 1 2 1 1 1 1 3 3 2 1 3 1 2 3 3 1 2 3 3 3 3 3 3 1 3 3 3 1 1 2 2 2 3 1 3 2 2 1 3 1 1 2 2 2 1 3 1 1 3 3 1 2 1 1 2 1 1 2 3 3 3 2 2 1 2 1 2 1 1 2 2 3 3 2 3 3 3 3 1 1 1 2 1 3 3 2 1 1 1 2 3 2 2 3 2 2 3 2 3 3 2 1 3 2 3 3 3 3 2 1 2 1 3 1 3 3 3 1 1 1 3 2 3 3 3...
output:
TAK 499999
result:
ok good solution
Test #53:
score: 0
Accepted
time: 25ms
memory: 34372kb
input:
500000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
TAK 1
result:
ok good solution
Test #54:
score: 0
Accepted
time: 44ms
memory: 34528kb
input:
500000 2 108603 474541 261977 447513 285402 383780 239206 497512 475159 380581 317915 169919 340077 380992 471386 463330 429671 113679 496283 173043 449384 156244 319985 135355 282262 345239 218012 367654 219736 305927 307901 427184 271860 204339 150715 188313 216277 157300 222028 310633 404004 1446...
output:
TAK 221241
result:
ok good solution
Test #55:
score: 0
Accepted
time: 31ms
memory: 34384kb
input:
500000 2 22 24 30 30 27 22 24 26 26 25 30 26 27 28 30 29 22 25 28 27 22 25 28 28 28 26 23 23 22 24 23 29 23 22 24 26 23 22 29 30 30 28 30 26 29 23 22 27 29 23 26 27 25 24 28 24 24 22 30 29 27 24 30 27 27 28 26 25 26 26 27 27 24 24 30 24 30 27 25 30 29 22 30 29 24 23 25 29 28 29 29 22 30 22 24 29 24 ...
output:
TAK 485762
result:
ok good solution
Test #56:
score: 0
Accepted
time: 43ms
memory: 34380kb
input:
500000 2 1000010 1000019 1000032 1000041 1000051 1000059 1000070 1000078 1000089 1000097 1000110 1000120 1000131 1000139 1000148 1000156 1000166 1000176 1000187 1000199 1000210 1000217 1000234 1000240 1000247 1000261 1000267 1000282 1000287 1000303 1000311 1000317 1000328 1000342 1000346 1000358 100...
output:
TAK 499999
result:
ok good solution
Test #57:
score: 0
Accepted
time: 47ms
memory: 34420kb
input:
499999 2 100014 100002 100023 100039 100043 100056 100068 100076 100084 100091 100106 100114 100121 100138 100141 100153 100162 100172 100185 100194 100208 100219 100222 100233 100241 100256 100263 100273 100285 100299 100304 100314 100328 100335 100348 100355 100362 100379 100387 100394 100402 1004...
output:
NIE
result:
ok no solution
Subtask #6:
score: 0
Wrong Answer
Test #58:
score: 1
Accepted
time: 35ms
memory: 34340kb
input:
500000 3 500000003 500000017 500000027 500000036 500000043 500000054 500000066 500000078 500000082 500000094 500000104 500000114 500000123 500000133 500000147 500000158 500000169 500000178 500000181 500000191 500000203 500000212 500000221 500000235 500000247 500000254 500000266 500000271 500000283 5...
output:
TAK 5105 5106
result:
ok good solution
Test #59:
score: 0
Accepted
time: 44ms
memory: 34372kb
input:
500000 3 8 18 25 36 46 52 64 73 86 95 102 117 122 135 149 154 170 173 184 198 202 219 227 235 243 255 265 274 284 298 302 314 323 333 342 356 362 379 383 400 406 415 422 433 450 460 462 478 482 494 509 518 523 532 549 553 570 572 582 592 604 615 625 633 643 659 666 673 683 696 704 720 726 737 743 75...
output:
TAK 227755 227756
result:
ok good solution
Test #60:
score: 0
Accepted
time: 49ms
memory: 34488kb
input:
500000 3 76142 184713 162332 231317 253409 149983 403631 443598 294194 383351 452080 198956 441905 449265 391601 353022 432725 69532 324491 434497 237660 162995 192517 457126 420577 158438 5850 130789 3683 11345 204100 323809 484964 332197 218478 95950 356909 352741 157449 279980 57783 290708 278063...
output:
TAK 101575 101576
result:
ok good solution
Test #61:
score: 0
Accepted
time: 55ms
memory: 34316kb
input:
500000 2 514352328 419469602 69028724 932894833 551820066 136805601 384554640 230759153 376618696 893194199 618515144 942421993 275644998 788618349 739540931 695090150 804883196 690139819 732309331 101220474 278500843 300129869 625978295 190672784 425421318 300777959 242923171 435876571 994370313 14...
output:
NIE
result:
ok no solution
Test #62:
score: 0
Accepted
time: 21ms
memory: 30716kb
input:
262144 3 1 3 1 2 3 1 2 2 2 1 3 2 1 2 3 2 3 3 2 1 2 3 3 3 2 3 3 2 1 2 2 3 3 1 1 3 1 2 3 1 2 2 1 1 3 1 1 1 1 1 1 2 3 3 1 1 3 2 2 1 2 1 2 1 2 3 2 3 2 3 2 3 1 1 3 1 2 1 3 2 2 3 1 2 2 3 3 1 2 2 1 1 2 2 1 3 3 3 2 1 3 1 3 1 1 1 3 3 2 3 3 1 3 2 1 3 1 1 3 1 2 2 3 3 2 2 3 1 3 1 2 3 1 2 2 2 2 2 2 2 3 1 3 1 2 1...
output:
TAK 1 2
result:
ok good solution
Test #63:
score: 0
Accepted
time: 22ms
memory: 34488kb
input:
500000 3 1 2 3 2 3 2 2 2 3 3 3 2 3 3 2 3 2 2 2 3 3 2 3 2 2 2 3 2 2 3 2 2 3 3 2 3 2 3 3 2 3 2 3 3 2 3 3 2 3 2 3 2 3 2 2 3 2 3 2 2 3 3 3 2 2 3 3 3 2 3 2 2 2 2 2 2 2 2 2 2 2 3 2 2 3 3 2 2 3 3 2 3 3 2 3 2 3 3 2 2 2 2 3 2 2 2 2 3 2 2 3 2 2 3 3 3 2 3 2 3 3 3 2 3 3 2 3 3 3 2 3 3 2 2 3 2 3 2 2 3 2 2 3 2 3 2...
output:
NIE
result:
ok no solution
Test #64:
score: 0
Accepted
time: 38ms
memory: 34492kb
input:
500000 3 1 198265967 513475945 700860821 751064997 294702285 7206959 177826037 44853414 360642971 532149946 596346948 363717178 814225874 634480125 455271233 6324984 174750277 982876662 335110143 390117660 934734740 602513555 997456115 436668936 963105153 964055824 87395066 424621837 393654281 96129...
output:
NIE
result:
ok no solution
Test #65:
score: 0
Accepted
time: 33ms
memory: 34492kb
input:
500000 2 241 266 250 256 290 244 315 393 294 294 306 324 318 296 279 306 303 354 400 317 365 251 371 318 300 338 252 252 379 382 395 366 299 352 334 346 293 337 341 288 245 357 395 362 332 372 263 330 309 363 316 253 375 304 343 350 246 360 269 260 341 334 380 346 369 396 281 335 267 311 324 363 248...
output:
TAK 30884
result:
ok good solution
Test #66:
score: -1
Wrong Answer
time: 49ms
memory: 34472kb
input:
499987 3 5000067 218 226 232 244 253 266 277 282 292 308 311 324 332 341 359 365 373 385 398 401 414 429 436 442 453 466 479 488 494 502 517 522 539 549 557 568 578 587 592 609 619 627 632 642 657 667 674 683 699 701 713 723 738 745 758 761 778 786 795 809 818 821 836 841 851 865 879 888 897 906 916...
output:
TAK
result:
wrong output format Unexpected end of file - int32 expected
Subtask #7:
score: 0
Wrong Answer
Test #67:
score: 1
Accepted
time: 21ms
memory: 30036kb
input:
200000 3 2 20 22 38 44 53 70 76 82 100 102 120 128 137 148 159 168 178 186 199 203 218 222 232 242 255 270 275 287 293 308 318 329 340 345 356 368 377 390 394 407 415 428 436 442 452 463 478 485 493 510 515 524 539 549 555 565 573 588 595 608 618 622 640 642 653 662 673 689 700 710 713 727 735 748 7...
output:
TAK 147546 147547
result:
ok good solution
Test #68:
score: 0
Accepted
time: 22ms
memory: 29892kb
input:
200000 3 4 19 25 36 47 57 65 76 89 97 104 112 129 137 148 152 169 176 183 196 208 217 224 239 245 259 270 276 287 294 303 318 326 335 346 359 368 373 390 398 407 420 424 440 447 460 470 474 484 500 504 515 526 536 544 559 563 573 589 594 602 612 629 637 642 655 663 680 689 693 708 713 725 737 750 75...
output:
TAK 1382 1383
result:
ok good solution
Test #69:
score: 0
Accepted
time: 14ms
memory: 30016kb
input:
200000 3 2 1 1 1 2 3 2 1 2 3 1 2 2 2 1 1 1 3 2 1 3 3 3 1 2 3 3 3 3 3 3 2 3 3 2 2 3 1 2 1 2 1 1 1 1 1 2 3 1 2 1 2 3 3 3 2 2 1 2 3 3 2 3 3 3 2 2 3 2 2 1 3 1 1 1 1 3 2 2 2 2 2 2 3 3 3 3 3 1 2 1 3 1 3 3 1 3 2 3 3 1 3 2 3 2 2 2 3 3 3 1 3 3 1 3 1 2 1 2 3 2 2 1 3 3 3 2 1 3 1 1 1 1 3 1 2 3 2 1 1 2 2 2 1 1 1...
output:
TAK 1 2
result:
ok good solution
Test #70:
score: -1
Wrong Answer
time: 31ms
memory: 30812kb
input:
200000 4 999999990 1000000000 999999990 999999995 999999991 999999991 999999997 999999996 999999994 999999995 999999996 999999995 999999990 999999998 999999991 999999990 999999993 999999990 999999996 1000000000 999999994 999999996 999999997 999999996 999999995 999999998 999999994 999999991 999999999...
output:
TAK 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 41 42 43 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105...
result:
wrong output format Extra information in the output file
Subtask #8:
score: 0
Wrong Answer
Test #80:
score: 1
Accepted
time: 20ms
memory: 30660kb
input:
262145 3 6 13 24 38 49 58 62 78 88 96 102 117 130 139 147 152 169 179 184 199 206 217 222 237 245 260 264 279 286 296 303 312 330 336 345 357 362 379 390 399 405 415 425 432 450 453 467 480 488 497 505 520 523 535 548 559 565 576 585 600 608 617 630 636 648 652 662 677 684 700 706 715 726 738 747 75...
output:
TAK 42092 42093
result:
ok good solution
Test #81:
score: 0
Accepted
time: 39ms
memory: 31488kb
input:
299999 3 5 19 27 40 44 52 70 75 85 99 108 112 129 140 148 156 166 172 188 196 204 214 227 235 249 257 267 272 288 294 305 312 326 339 344 359 370 374 390 397 405 415 426 436 450 456 466 479 483 498 509 515 524 535 546 555 568 574 582 596 610 620 623 636 645 653 664 673 683 694 702 712 727 738 743 76...
output:
TAK 232708 232709
result:
ok good solution
Test #82:
score: 0
Accepted
time: 25ms
memory: 31504kb
input:
300000 3 2 1 3 2 2 1 1 2 1 3 2 3 2 1 1 2 3 1 2 2 2 3 1 3 3 1 3 2 2 3 2 3 1 2 3 2 2 2 1 2 3 3 2 2 1 3 1 3 2 3 2 3 1 2 3 1 3 3 3 1 2 2 3 2 3 2 1 2 2 1 3 3 3 2 3 3 3 2 1 3 3 2 2 3 2 2 2 1 2 3 2 2 3 3 1 1 3 2 1 3 3 2 1 1 3 3 1 2 2 2 2 2 1 1 3 1 1 3 1 1 1 2 3 3 3 3 3 2 2 1 2 2 1 1 3 3 1 2 3 3 3 2 2 2 2 3...
output:
TAK 1 2
result:
ok good solution
Test #83:
score: -1
Wrong Answer
time: 34ms
memory: 32524kb
input:
300000 4 999999994 999999992 999999992 999999998 999999995 999999999 999999996 1000000000 1000000000 999999999 999999990 999999997 999999994 999999994 999999995 999999997 999999997 999999998 999999995 999999996 999999997 999999997 999999996 999999998 999999998 999999990 999999990 999999993 999999997...
output:
TAK 1 2 3 4 5 6 7 8 9 10 11 12 13 17 18 19 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 69 70 71 72 73 74 75 76 77 78 79 80 81 82 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 ...
result:
wrong output format Extra information in the output file
Subtask #9:
score: 0
Wrong Answer
Test #92:
score: 1
Accepted
time: 25ms
memory: 30728kb
input:
262146 3 5 19 27 40 44 52 70 75 85 99 108 112 129 140 148 156 166 172 188 196 204 214 227 235 249 257 267 272 288 294 305 312 326 339 344 359 370 374 390 397 405 415 426 436 450 456 466 479 483 498 509 515 524 535 546 555 568 574 582 596 610 620 623 636 645 653 664 673 683 694 702 712 727 738 743 76...
output:
TAK 38377 38378
result:
ok good solution
Test #93:
score: 0
Accepted
time: 35ms
memory: 32796kb
input:
400000 3 6 13 24 38 49 58 62 78 88 96 102 117 130 139 147 152 169 179 184 199 206 217 222 237 245 260 264 279 286 296 303 312 330 336 345 357 362 379 390 399 405 415 425 432 450 453 467 480 488 497 505 520 523 535 548 559 565 576 585 600 608 617 630 636 648 652 662 677 684 700 706 715 726 738 747 75...
output:
TAK 314714 314715
result:
ok good solution
Test #94:
score: 0
Accepted
time: 31ms
memory: 32784kb
input:
400000 3 3 1 3 2 2 3 1 3 3 2 2 1 2 3 2 2 1 3 1 1 2 2 2 2 2 2 3 1 2 3 2 3 2 3 2 1 1 3 1 1 1 2 1 3 3 1 2 1 1 1 1 3 1 2 2 2 3 3 2 2 1 1 3 1 3 1 3 2 2 2 3 3 1 2 2 1 2 3 3 2 2 1 1 3 3 3 3 2 1 1 3 3 3 2 3 1 3 2 2 3 2 2 3 1 3 1 3 2 2 1 2 3 3 2 3 3 3 3 2 2 3 2 1 1 2 1 1 1 3 3 2 3 2 3 1 1 3 3 3 1 1 1 3 3 1 1...
output:
TAK 1 2
result:
ok good solution
Test #95:
score: -1
Wrong Answer
time: 76ms
memory: 34368kb
input:
400000 4 999999994 999999992 999999997 999999993 999999998 999999994 999999996 999999995 999999995 999999996 999999994 999999990 999999993 999999990 999999990 999999992 999999996 999999996 999999995 999999994 1000000000 999999991 1000000000 999999995 999999992 999999995 999999996 999999995 999999997...
output:
TAK 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 99 100 101 102 103 104 105 10...
result:
wrong output format Extra information in the output file
Subtask #10:
score: 0
Wrong Answer
Test #106:
score: 1
Accepted
time: 51ms
memory: 34392kb
input:
499999 3 6 13 24 38 49 58 62 78 88 96 102 117 130 139 147 152 169 179 184 199 206 217 222 237 245 260 264 279 286 296 303 312 330 336 345 357 362 379 390 399 405 415 425 432 450 453 467 480 488 497 505 520 523 535 548 559 565 576 585 600 608 617 630 636 648 652 662 677 684 700 706 715 726 738 747 75...
output:
TAK 341906 341907
result:
ok good solution
Test #107:
score: 0
Accepted
time: 41ms
memory: 34416kb
input:
500000 3 413423474 972924559 25444661 17117394 179085016 194118196 842074515 178130266 708851309 377794792 217671941 269350315 861734575 291683801 44740519 938114455 250385366 561222511 893930676 659766616 684694210 430331238 859267083 76748856 769147012 544643715 150954917 323496453 808859154 97589...
output:
TAK 372042 372043
result:
ok good solution
Test #108:
score: 0
Accepted
time: 32ms
memory: 34388kb
input:
500000 3 1 1 2 3 2 2 2 2 1 1 3 1 2 2 3 3 2 2 1 1 3 3 1 3 3 1 3 3 1 2 1 1 2 1 1 1 3 3 3 2 3 3 2 3 2 3 1 3 2 3 3 3 2 3 3 3 3 2 3 3 3 1 3 3 2 3 1 1 2 1 2 1 2 3 1 1 3 3 3 3 3 1 2 3 2 2 3 3 2 3 3 2 3 1 1 1 3 2 1 3 2 1 1 1 1 3 1 1 3 3 3 2 1 2 2 3 3 2 1 2 3 1 2 1 3 2 3 2 3 1 1 1 2 2 3 3 2 2 2 3 2 3 3 3 2 3...
output:
TAK 1 2
result:
ok good solution
Test #109:
score: -1
Wrong Answer
time: 74ms
memory: 36528kb
input:
500000 4 999999995 999999992 999999995 999999999 999999992 999999995 999999996 999999997 999999990 999999993 999999990 999999994 999999996 999999997 999999997 999999991 999999993 999999993 999999994 999999990 999999993 999999992 999999990 999999999 999999997 999999998 1000000000 999999998 999999996 ...
output:
TAK 1 2 3 4 5 7 8 9 10 11 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 ...
result:
wrong output format Extra information in the output file