QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#873992 | #9682. nim 游戏 | thomas0702 | 0 | 223ms | 178952kb | C++14 | 4.7kb | 2025-01-27 11:09:18 | 2025-01-27 11:09:19 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define lll __int128
#define db double
#define ld long double
#define eps 1e-8
#define fir first
#define sec second
#define pb push_back
using namespace std;
void rd(){}
template<typename T,typename... U> void rd(T &x,U&... arg){
x=0;int f=1,c=getchar();
while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();}
while(c>='0'&&c<='9') x=x*10+c-48,c=getchar();
x*=f;rd(arg...);
}
template<typename T> void wr(T n,char end=0){
if(n<0) putchar('-'),n=-n;
if(n==0) putchar('0');
static int a[50];int p=0;
while(n!=0){a[++p]=(int)(n%10);n/=10;}
while(p) putchar(a[p--]+48);
if(end) putchar(end);
}
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
template<typename T> inline bool chkmax(T &x,T y){return x<y&&(x=y,1);}
const int maxn=2e5+5;
const ll inf=0x3f3f3f3f3f3f3f3f;
int testid,N,M,__M,V;
ll a[maxn],b[maxn],K,s,k;
typedef map<int,ll> info;
info mp;
vector<info> ans;
pli arr[62][maxn];//对第i位按照后i-1位大小排序
int n[62];//第i位为0的数量
vector<int> vec;//当前低位全都是0的下标集合
inline void upd(int i,int p,ll nxt){
nxt=~nxt?nxt:((b[i]>>p<<p)+(1LL<<p));
if((mp[i]=nxt)==a[i]) vec.pop_back(),mp.erase(i);
if(b[i]==a[i]) vec.pb(i);
s^=b[i]^nxt,k+=nxt-b[i],b[i]=nxt;
}
bool dfs(int p){
if(k>K||__M>=M) return 0;
if(p==-1) return ans.pb(mp),__M++,1;
if(!((s>>p)&1)) return dfs(p-1);
bool flag=0,f=1;
for(int i=1;i<=n[p]&&f;i++){
int x=arr[p][i].sec;
if(b[x]!=a[x]) continue;
upd(x,p,-1);
f=dfs(p-1);
flag|=f;
upd(x,p,a[x]);
}
if(f){
int siz=(int)vec.size();
for(int i=0;i<siz&&f;i++){
int x=vec[i];
ll t=b[x];
upd(x,p,-1);
f=dfs(p-1);
flag|=f;
upd(x,p,t);
}
}
return flag&&__M<M;
}
void __main(){
V=0;
rd(N,M);
for(int i=1;i<=N;i++) rd(a[i]);
for(int i=1;i<=N;i++)
for(int j=0;j<=60;j++)
if((1LL<<j)>a[i]){
V=max(V,j);
break;
}
int pos=-1;
auto check=[&](int p){
ll s=0,k=0;
for(int i=1;i<=N;i++) b[i]=a[i],s^=b[i];
if(~p){
ll Max1=-1,Max2=-1;
int id1=0,id2=0;
for(int i=1;i<=N;i++)
if(!((b[i]>>p)&1)){
ll t=b[i]&((1LL<<p)-1);
if(t>Max1) Max2=Max1,id2=id1,Max1=t,id1=i;
else if(t>Max2) Max2=t,id2=i;
}
if(!id2) return inf;
k=(1LL<<(p+1))-Max1-Max2;
s^=b[id1]^b[id2];
b[id1]=(b[id1]>>p<<p)+(1LL<<p);
b[id2]=(b[id2]>>p<<p)+(1LL<<p);
s^=b[id1]^b[id2];
}
for(int i=V;~i;i--){
if((s>>i)&1){
ll Max=-1;
int id=0;
for(int j=1;j<=N;j++)
if(!((b[j]>>i)&1)&&chkmax(Max,b[j]&((1LL<<i)-1)))
id=j;
if(!id) return pos=i,inf;
k+=(1LL<<i)-Max;
s^=b[id];
b[id]=(b[id]>>i<<i)+(1LL<<i);
s^=b[id];
}
}
return k;
};
K=check(-1);
vector<int> vec;
if(~pos){
for(int i=V;i>pos;i--){
ll t=check(i);
if(K>t) K=t,vec.clear();
if(K==t) vec.pb(i);
}
}else vec.pb(-1);
__M=0,s=k=0;
ans.clear();
for(int i=1;i<=N;i++) b[i]=a[i],s^=b[i];
for(int i=V;~i;i--){
n[i]=0;
for(int j=1;j<=N;j++)
if(!((a[j]>>i)&1))
arr[i][++n[i]]={(a[j]&((1LL<<i)-1)),j};
sort(arr[i]+1,arr[i]+n[i]+1,[](pil i,pil j){return i.fir>j.fir;});
}
cout<<"N = "<<N<<", M = "<<M<<", pos = "<<pos<<"\n";
for(int p:vec){
if(__M>=M) break;
if(p==-1){dfs(V);break;}
for(int i=2;i<=n[p]&&__M<M;i++){
bool flag=0;
for(int j=1;j<i&&__M<M;j++){
int xi=arr[p][i].sec,xj=arr[p][j].sec;
upd(xi,p,-1);
upd(xj,p,-1);
bool f=dfs(p-1);
flag|=f;
upd(xi,p,a[xi]);
upd(xj,p,a[xj]);
if(!f) break;
}
if(!flag) break;
}
}
wr(K,'\n'),wr(__M,'\n');
for(info mp:ans){
wr(mp.size(),'\n');
for(auto i:mp) wr(i.fir,' ');
putchar('\n');
for(auto i:mp) wr(i.sec-a[i.fir],' ');
putchar('\n');
}
}
int main(){
// freopen("2.in","r",stdin);
// freopen("nim.in","r",stdin);
// freopen("nim.out","w",stdout);
int T;rd(testid,T);
while(T--) __main();
return 0;
}
//g++ -std=c++14 -O2 -Wall -Wextra -Wconversion nim.cpp -o nim
詳細信息
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 16ms
memory: 69208kb
input:
1 10000 2 1 787709928 658090405 2 1 508859442 320865978 2 1 901516660 1071318821 2 1 924326675 330656846 2 1 556507192 599101864 2 1 518528812 842021415 2 1 153781736 213270767 2 1 161460204 140517709 2 1 344895823 339053034 2 1 76824343 446590781 2 1 943442122 128864577 2 1 186128196 166832232 2 1 ...
output:
N = 2, M = 1, pos = -1 129619523 1 1 2 129619523 N = 2, M = 1, pos = -1 187993464 1 1 2 187993464 N = 2, M = 1, pos = -1 169802161 1 1 1 169802161 N = 2, M = 1, pos = -1 593669829 1 1 2 593669829 N = 2, M = 1, pos = -1 42594672 1 1 1 42594672 N = 2, M = 1, pos = -1 323492603 1 1 1 3234926...
result:
wrong output format Expected integer, but "N" found
Pretest #2:
score: 0
Wrong Answer
time: 0ms
memory: 13908kb
input:
2 5 5 2000 0 1 15 5 8 5 2000 0 13 11 14 7 5 2000 0 1 1 2 3 5 2000 0 7 4 4 9 5 2000 0 13 10 12 8
output:
N = 5, M = 2000, pos = -1 1 2 1 2 1 1 4 1 N = 5, M = 2000, pos = -1 1 1 1 5 1 N = 5, M = 2000, pos = -1 1 2 1 1 1 1 4 1 N = 5, M = 2000, pos = -1 2 4 2 1 2 1 1 2 2 3 1 1 2 2 4 1 1 1 2 2 N = 5, M = 2000, pos = -1 1 1 1 2 1
result:
wrong output format Expected integer, but "N" found
Pretest #3:
score: 0
Wrong Answer
time: 1ms
memory: 13656kb
input:
3 5 5 2000 0 12 14 13 4 5 2000 0 14 5 5 11 5 2000 0 12 3 0 1 5 2000 0 8 5 9 11 5 2000 0 8 7 1 2
output:
N = 5, M = 2000, pos = -1 9 3 3 1 4 5 4 1 4 2 4 5 1 8 2 1 4 8 1 N = 5, M = 2000, pos = -1 3 10 3 1 3 5 1 1 1 3 2 3 5 1 1 1 2 3 5 1 2 2 3 5 2 1 3 1 4 5 1 1 1 3 2 4 5 1 1 1 2 4 5 1 2 2 4 5 2 1 2 1 5 2 1 1 5 3 N = 5, M = 2000, pos = -1 8 2 2 3 5 5 3 2 3 5 1 7 N = 5, M = 20...
result:
wrong output format Expected integer, but "N" found
Pretest #4:
score: 0
Wrong Answer
time: 0ms
memory: 13904kb
input:
4 5 5 2000 0 0 3 13 5 5 2000 0 9 10 14 3 5 2000 0 4 7 10 3 5 2000 0 9 14 5 0 5 2000 0 6 4 7 12
output:
N = 5, M = 2000, pos = -1 5 5 3 1 3 5 1 1 3 3 2 3 5 1 1 3 2 3 5 1 4 2 3 5 2 3 1 3 5 N = 5, M = 2000, pos = -1 8 2 3 2 3 5 1 2 5 2 2 5 3 5 N = 5, M = 2000, pos = -1 4 4 3 1 3 5 2 1 1 3 2 3 5 2 1 1 2 3 5 3 1 2 3 5 1 3 N = 5, M = 2000, pos = -1 2 10 2 1 2 1 1 2 2 3 1 1 2 2 5 ...
result:
wrong output format Expected integer, but "N" found
Pretest #5:
score: 0
Wrong Answer
time: 2ms
memory: 28216kb
input:
5 5 6 2000 0 924 738 482 642 735 6 2000 0 506 297 82 577 913 6 2000 0 520 847 369 136 119 6 2000 0 690 849 528 740 840 6 2000 0 121 51 176 500 435
output:
N = 6, M = 2000, pos = -1 189 420 5 1 2 3 4 5 131 36 14 6 2 5 1 2 3 4 5 130 37 14 6 2 5 1 2 3 4 5 130 36 15 6 2 5 1 2 3 4 5 130 36 14 7 2 5 1 2 3 4 5 130 36 14 6 3 5 1 2 3 4 5 129 38 14 6 2 5 1 2 3 4 5 128 39 14 6 2 5 1 2 3 4 5 128 38 15 6 2 5 1 2 3 4 5 128 38 14 7 2 5 1 2 3 4 5 1...
result:
wrong output format Expected integer, but "N" found
Pretest #6:
score: 0
Wrong Answer
time: 0ms
memory: 28240kb
input:
6 5 6 2000 0 611 108 95 972 21 6 2000 0 477 6 212 751 342 6 2000 0 131 78 345 512 551 6 2000 0 606 560 666 251 1020 6 2000 0 837 1013 823 371 987
output:
N = 6, M = 2000, pos = -1 183 54 5 1 2 3 5 6 4 29 148 1 1 4 1 2 3 6 4 29 149 1 4 1 2 3 6 4 30 148 1 4 1 2 3 6 5 29 148 1 4 1 2 3 6 4 29 148 2 4 1 2 3 5 4 29 148 2 3 1 2 3 4 29 150 3 1 2 3 4 31 148 3 1 2 3 6 29 148 4 1 2 3 6 1 29 152 1 4 2 3 5 6 29 152 1 1 3 2 3 6 29 153 1 3 2...
result:
wrong output format Expected integer, but "N" found
Pretest #7:
score: 0
Wrong Answer
time: 0ms
memory: 26188kb
input:
7 5 6 2000 0 843 555 227 498 625 6 2000 0 365 658 849 181 373 6 2000 0 784 493 983 343 427 6 2000 0 628 848 762 675 423 6 2000 0 714 409 429 732 164
output:
N = 6, M = 2000, pos = -1 58 122 5 1 2 4 5 6 2 5 29 15 7 5 1 2 4 5 6 2 5 30 14 7 5 1 2 4 5 6 2 6 29 14 7 5 1 2 4 5 6 2 5 29 14 8 5 1 2 4 5 6 3 5 29 14 7 5 1 2 4 5 6 1 5 29 16 7 4 2 4 5 6 5 29 17 7 4 2 4 5 6 5 30 16 7 4 2 4 5 6 6 29 16 7 4 2 4 5 6 5 29 16 8 5 1 2 4 5 6 1 5 31 14 ...
result:
wrong output format Expected integer, but "N" found
Pretest #8:
score: 0
Wrong Answer
time: 81ms
memory: 103488kb
input:
8 272 100000 100 268435456 16 2 16 256 2 131072 1 536870912 16 134217728 4096 2048 8 512 8388608 33554432 128 1 134217728 256 2 16777216 256 4194304 1048576 536870912 262144 16 67108864 536870912 268435456 1024 2097152 2 128 512 512 512 4096 8388608 524288 2048 268435456 16 16384 512 4096 8192 16 65...
output:
N = 100000, M = 100, pos = -1 200828637 100 18 2891 4313 5226 14844 26629 31165 31428 37639 44825 53653 55072 59829 62242 76922 77688 86159 91632 94094 64 4194304 16384 2097152 134217728 16777216 1 128 33554432 8192 4 1048576 16 1024 8388608 8 512 524288 18 2891 3056 4313 5226 14844 26629 31165 37...
result:
wrong output format Expected integer, but "N" found
Pretest #9:
score: 0
Wrong Answer
time: 77ms
memory: 103496kb
input:
9 264 100000 100 64 32 4 67108864 4194304 262144 2048 1 8192 536870912 268435456 16 33554432 128 1048576 32768 2097152 536870912 2 1 8 64 1048576 4096 16777216 8192 2 16384 2048 2097152 16384 32 131072 2097152 2048 131072 134217728 134217728 4096 4096 32768 1048576 1024 268435456 2097152 16384 33554...
output:
N = 100000, M = 100, pos = -1 341268837 100 15 7148 20377 20489 23525 24365 25536 35602 43484 47097 51229 53902 64883 77429 90337 95932 1048576 65536 4194304 67108864 268435456 256 4096 4 64 32 131072 262144 2048 16384 1 15 7148 20377 20489 23525 24365 25536 35602 40719 43484 47097 51229 53902 648...
result:
wrong output format Expected integer, but "N" found
Pretest #10:
score: 0
Wrong Answer
time: 84ms
memory: 103352kb
input:
10 260 100000 100 2097152 2048 16777216 32 65536 262144 16777216 16384 524288 8192 1 2 1 32768 134217728 131072 2097152 1024 64 8388608 131072 4194304 2 262144 2 512 65536 2 262144 1 1 512 33554432 262144 32 8388608 1 16777216 524288 4 128 512 134217728 1 67108864 536870912 512 65536 32768 8388608 1...
output:
N = 100000, M = 100, pos = -1 156152625 100 14 12828 18256 26817 44158 54041 54559 65765 66080 72592 77492 78036 84134 85557 88440 134217728 524288 512 256 32768 8192 4194304 1 16777216 262144 16 32 131072 4096 14 12828 16910 18256 26817 44158 54041 54559 65765 72592 77492 78036 84134 85557 88440 ...
result:
wrong output format Expected integer, but "N" found
Pretest #11:
score: 0
Wrong Answer
time: 141ms
memory: 92840kb
input:
11 1926 100000 1 0 212593154 1052140456 972928282 462369044 673421356 1030921469 775492985 523349355 1069594143 190488188 492043456 733126324 341798699 724636365 947318175 262485282 931417678 663669259 740799776 535456704 684181464 19065576 53174255 514941440 670957241 988117825 629697943 45145107 1...
output:
N = 100000, M = 1, pos = -1 166 1 12 13090 24063 28278 50306 51529 55418 64735 66637 72327 74729 76307 84218 1 50 1 1 1 6 1 1 1 1 1 101 N = 27, M = 1, pos = -1 3507 1 9 2 5 8 9 10 16 19 24 27 960 1 16 444 40 124 1920 1 1 N = 3, M = 1, pos = -1 330 1 2 1 2 64 266 N = 3, M = 1, pos = -1 2702 1 2...
result:
wrong output format Expected integer, but "N" found
Pretest #12:
score: 0
Wrong Answer
time: 140ms
memory: 96532kb
input:
12 2322 100000 1 0 7039776 731926398 236886500 253555357 170069043 850149498 316268635 795618622 1065678481 633285758 1009207086 237836472 1017789866 399181873 324785167 527514687 676377746 338198269 270887526 278879561 639366360 646568377 35830334 462432910 876996649 282011992 376880056 871143466 6...
output:
N = 100000, M = 1, pos = -1 34074 1 12 17832 19226 27428 28261 30903 34296 41131 54949 55827 62594 73868 94839 328 1 1 1 3 287 9 1 33440 1 1 1 N = 30, M = 1, pos = -1 9706 1 9 2 3 4 5 12 15 16 18 27 128 1024 32 64 1 8192 1 256 8 N = 30, M = 1, pos = -1 159051 1 9 3 5 7 8 16 20 22 23 30 64 13107...
result:
wrong output format Expected integer, but "N" found
Pretest #13:
score: 0
Wrong Answer
time: 147ms
memory: 91788kb
input:
13 2464 100000 1 0 427935372 551832889 844721265 648958227 58702839 98231989 67300751 1070455997 255697378 699971877 1056963469 632702252 896835770 545070997 374682484 333464439 140377201 550440744 704064530 917272389 331841130 755945696 883819791 896333287 197663164 1004357948 335423689 95692127 34...
output:
N = 100000, M = 1, pos = -1 5015 1 18 7629 23228 34541 36654 38387 42740 43431 44283 53043 54590 57645 66454 66539 69119 71138 73197 76661 84060 1 1 1 2 45 2 1 1 1 191 53 1 1 3294 1412 1 6 1 N = 761, M = 1, pos = -1 40747082 1 18 4 62 65 210 282 284 315 319 375 385 401 414 415 506 531 572 706 747 ...
result:
wrong output format Expected integer, but "N" found
Pretest #14:
score: 0
Wrong Answer
time: 0ms
memory: 67152kb
input:
14 23 1000 10 0 698723699 153465147 73111165 241423619 281436251 113788324 332818071 542687168 77217995 707859065 70032469 945739237 152178890 73308725 1024104741 39038522 68449065 817070146 484673194 548054722 17751150 1033084930 799709329 351409876 1014395268 477743523 926399631 141641436 10162229...
output:
N = 1000, M = 10, pos = -1 2629849 10 14 33 39 374 397 514 556 574 748 807 844 875 938 953 998 1 1311479 1 33161 112 4 428 1 3803 1 1 155 48 1280654 14 33 39 374 397 514 556 574 748 779 807 875 938 953 998 1 1311479 1 33161 112 4 428 1 1 3803 1 155 48 1280654 14 33 39 298 374 397 514 556 574 748...
result:
wrong output format Expected integer, but "N" found
Pretest #15:
score: 0
Wrong Answer
time: 0ms
memory: 67168kb
input:
15 20 1000 10 0 325140143 399467215 271742503 190711881 796467699 212013868 800948731 598735180 276851093 459249598 988722552 598611576 105484598 808958849 841464615 178027765 508254895 206994337 1072632121 1049525925 403545743 729066403 167006626 616418294 1054659905 183353134 221931747 696125686 6...
output:
N = 1000, M = 10, pos = -1 132910 10 10 175 366 504 542 636 706 707 756 824 902 6482 136 1 280 1 14 6 16 89186 36788 10 175 366 504 542 615 706 707 756 824 902 6482 136 1 280 1 14 6 16 89186 36788 10 175 366 504 542 616 706 707 756 824 902 6482 136 1 280 1 14 6 16 89186 36788 10 175 366 504 54...
result:
wrong output format Expected integer, but "N" found
Pretest #16:
score: 0
Wrong Answer
time: 2ms
memory: 71248kb
input:
16 13 1000 10 0 482035639 676392463 177349717 883879216 637330885 636356465 296234635 413153479 243419329 335379052 28971145 245253558 649873071 989738887 859470495 546547468 165357700 205836231 930726901 836955479 527409688 413040184 425801996 723492123 804913055 914899671 430466328 1001437510 3421...
output:
N = 1000, M = 10, pos = -1 938103 10 18 11 26 91 118 142 181 241 268 291 302 483 567 582 658 719 746 776 864 165268 393313 105609 4858 1 221826 1 1 1 55 42557 183 2196 1 1 169 2062 1 18 11 26 91 118 142 181 241 268 291 302 483 567 582 693 719 746 776 864 165268 393313 105609 4858 1 221826 1 1 1 5...
result:
wrong output format Expected integer, but "N" found
Pretest #17:
score: 0
Wrong Answer
time: 1ms
memory: 67164kb
input:
17 25 1000 10 0 204462620 639500437 1036012729 739663091 537559905 884930259 908629202 87714371 214733383 426959949 412554835 286343676 997368563 336872508 137649097 499408853 98787579 526714350 509336631 438105017 488897961 521760143 786808538 496422268 1006079836 855395010 204030938 325348670 4189...
output:
N = 1000, M = 10, pos = -1 1515532 10 18 74 123 135 199 257 259 402 406 423 471 519 545 606 627 680 681 811 985 708963 1 180 278032 4148 28978 1 1 4 1 16 1 486260 356 7999 1 589 1 18 74 123 135 199 257 259 402 406 423 471 519 545 606 627 680 707 811 985 708963 1 180 278032 4148 28978 1 1 4 1 16 1...
result:
wrong output format Expected integer, but "N" found
Pretest #18:
score: 0
Wrong Answer
time: 114ms
memory: 94176kb
input:
18 235 100000 1000 0 82292805 542862389 496765580 714793373 1018727959 380589532 235510694 439236106 450402753 644037967 69084284 398499559 833754127 162045571 1073497987 905929801 414312207 964010413 690834864 244433021 782011334 138519454 409419856 431781810 1035339746 480460956 415997860 10156623...
output:
N = 100000, M = 1000, pos = -1 34345 1000 21 643 7468 26560 34910 41991 42711 47588 47771 51228 51617 68013 68491 71125 79998 83905 85101 86749 90794 94704 96349 97142 75 1 65 1 1 1 1 1 4 1 1 2 5777 373 24144 59 7 56 1 3773 1 21 643 7468 21939 26560 34910 41991 42711 47588 51228 51617 68013 68491 ...
result:
wrong output format Expected integer, but "N" found
Pretest #19:
score: 0
Wrong Answer
time: 103ms
memory: 93616kb
input:
19 236 100000 1000 0 109677213 768433554 834865731 720533892 838023709 491602375 513068054 1030589833 94664107 745436908 1037219078 228408014 547804495 508518110 773484880 380678427 782156458 113943184 307779979 912132791 587642137 735393238 657215861 44405388 83221805 174662600 163585186 300009673 ...
output:
N = 100000, M = 1000, pos = -1 3319 1000 16 2593 10726 25501 30973 33380 33657 43122 51845 54785 63148 66831 71580 92540 94162 95109 95275 58 1 1 84 1 1 33 2 1 1 1 1992 648 492 1 2 16 2593 10726 25501 30973 33380 33657 43122 51845 54785 63148 66804 71580 92540 94162 95109 95275 58 1 1 84 1 1 33 2...
result:
wrong output format Expected integer, but "N" found
Pretest #20:
score: 0
Wrong Answer
time: 111ms
memory: 91696kb
input:
20 210 100000 1000 0 550139852 961781343 290521815 952492729 457397512 357809864 204830121 1140484 170664856 470999550 1055212876 691814384 638327612 265853133 674623701 160349476 763151462 881390841 355393034 667147513 628883665 627392037 395945621 565511024 979892315 870090061 43124702 944114976 1...
output:
N = 100000, M = 1000, pos = -1 533 1000 17 7762 15355 17493 33415 34762 38665 43521 47605 54076 55577 57647 66786 74010 85794 87756 88377 90657 9 1 1 1 7 1 1 98 4 1 1 1 1 1 53 351 1 17 7762 15355 17493 33415 34762 38665 43521 47605 54076 55577 57647 66760 74010 85794 87756 88377 90657 9 1 1 1 7 1...
result:
wrong output format Expected integer, but "N" found
Pretest #21:
score: 0
Wrong Answer
time: 106ms
memory: 95440kb
input:
21 246 100000 1000 0 897255135 331582452 692933508 605776464 745133272 287951719 636521474 674882787 145593015 355040634 666511339 967360297 920416500 1010174993 220923757 1062201185 392857314 952622455 432831665 591343815 983505947 314879003 323044 876019636 3896524 753501041 48852262 176877973 104...
output:
N = 100000, M = 1000, pos = -1 18210 1000 14 9641 21149 22875 27958 30465 36601 58494 61209 66389 66606 77515 82261 89565 92166 10717 47 4636 2126 1 190 331 1 1 155 1 1 1 2 14 9641 21149 22875 27958 30465 36601 58494 61209 66367 66606 77515 82261 89565 92166 10717 47 4636 2126 1 190 331 1 1 155 1...
result:
wrong output format Expected integer, but "N" found
Pretest #22:
score: 0
Wrong Answer
time: 97ms
memory: 95424kb
input:
22 237 99999 1000 0 19429538 32580338 239047420 111765496 237262980 10571876 197851450 233191405 192728811 23616992 2112605 201810362 35237428 102317792 1287284 107825938 219438710 182319519 243718852 90090242 90138990 118813262 207877046 233448598 224872276 5939550 82514558 103000114 13729014 79388...
output:
N = 99999, M = 1000, pos = -1 3840 1000 13 4284 18654 42958 47708 52746 55402 62264 62603 65135 71044 72641 75659 77404 1 1 31 469 107 1 312 6 2867 20 22 1 2 13 4284 18654 42958 47708 52746 55381 62264 62603 65135 71044 72641 75659 77404 1 1 31 469 107 1 312 6 2867 20 22 1 2 13 4284 18654 42958 ...
result:
wrong output format Expected integer, but "N" found
Pretest #23:
score: 0
Wrong Answer
time: 95ms
memory: 92668kb
input:
23 229 99999 1000 0 251252946 107619243 220631496 246783065 243267863 37598061 174732100 119356777 38068361 57156544 232667237 83660542 90081294 219829370 268237117 43024835 122172878 186256566 48858424 81564486 177620789 177890699 37297432 39654072 59706273 144598610 213246934 239565341 192674874 1...
output:
N = 99999, M = 1000, pos = -1 3129 1000 10 32028 39798 62963 65639 66421 66691 71904 73096 87117 87628 1 7 1 1 1 3071 1 33 12 1 10 32028 39798 62963 65639 66401 66691 71904 73096 87117 87628 1 7 1 1 1 3071 1 33 12 1 10 32028 39798 62963 65639 66402 66691 71904 73096 87117 87628 1 7 1 1 1 3071 1...
result:
wrong output format Expected integer, but "N" found
Pretest #24:
score: 0
Wrong Answer
time: 223ms
memory: 178472kb
input:
24 295 99999 2000 0 144446187652890493 178777776597373669 235188002077979946 277503908732511739 47638688657611750 68964406333979880 151013710872842158 146243386861595119 99485082905765142 200318010185323152 282591375727049216 123011484444631758 286520503049914226 232871465119451744 18280893731725023...
output:
N = 99999, M = 2000, pos = -1 5526392210479 0 N = 5, M = 100, pos = 32 9460024634 0 N = 25, M = 2, pos = 13 17151 2 7 4 10 11 13 15 17 18 60 512 192 1 12286 4092 8 7 4 10 11 15 17 18 25 60 512 192 12286 4092 8 1 N = 88, M = 100, pos = -1 4127586088690318 0 N = 6, M = 1, pos = -1 2079026164092 0 ...
result:
wrong output format Expected integer, but "N" found
Pretest #25:
score: 0
Wrong Answer
time: 223ms
memory: 178952kb
input:
25 302 99999 2000 0 158060258327551 71283336971520116 219425730293845004 160993545682455627 118267401240028100 71239693681579669 269286666497227789 93391159342185951 23853690640806525 151733498955852704 124666395764102330 67021920580696748 119814027172684125 70463976282802752 2939723111608543 127044...
output:
N = 99999, M = 2000, pos = -1 4114663026142 0 N = 36, M = 100, pos = -1 2335329 100 9 2 3 7 8 9 10 20 34 36 236 359424 1968 73728 1884160 1 1 3 15808 9 2 3 7 8 9 10 34 35 36 236 359424 1968 73728 1884160 1 3 1 15808 9 2 3 7 8 9 10 33 34 36 236 359424 1968 73728 1884160 1 1 3 15808 9 2 3 7 8 9 ...
result:
wrong output format Expected integer, but "N" found
Final Tests
Test #1:
score: 0
Wrong Answer
time: 14ms
memory: 66904kb
input:
1 10000 2 1 324097321 555675086 2 1 304655177 991244276 2 1 9980291 383616352 2 1 1071036550 795625380 2 1 682098056 68370721 2 1 969101726 685975156 2 1 973896269 354857775 2 1 196188000 606494155 2 1 754416123 467588829 2 1 495704303 558090120 2 1 618002000 491488050 2 1 741575237 9937018 2 1 1002...
output:
N = 2, M = 1, pos = -1 231577765 1 1 1 231577765 N = 2, M = 1, pos = -1 686589099 1 1 1 686589099 N = 2, M = 1, pos = -1 373636061 1 1 1 373636061 N = 2, M = 1, pos = -1 275411170 1 1 2 275411170 N = 2, M = 1, pos = -1 613727335 1 1 2 613727335 N = 2, M = 1, pos = -1 283126570 1 1 2 28312...
result:
wrong output format Expected integer, but "N" found
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 15948kb
input:
2 5 5 2000 0 13 3 4 10 5 2000 0 3 9 1 11 5 2000 0 13 7 3 5 5 2000 0 1 13 9 2 5 2000 0 8 14 7 13
output:
N = 5, M = 2000, pos = -1 0 1 0 N = 5, M = 2000, pos = -1 0 1 0 N = 5, M = 2000, pos = -1 2 2 2 2 3 1 1 2 3 5 1 1 N = 5, M = 2000, pos = -1 3 2 2 1 5 1 2 1 5 3 N = 5, M = 2000, pos = -1 2 1 2 4 5 1 1
result:
wrong output format Expected integer, but "N" found
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 13908kb
input:
3 5 5 2000 0 4 14 5 7 5 2000 0 2 15 0 12 5 2000 0 1 14 0 5 5 2000 0 13 4 12 3 5 2000 0 10 10 1 11
output:
N = 5, M = 2000, pos = -1 6 2 3 1 4 5 4 1 1 2 4 5 1 5 N = 5, M = 2000, pos = -1 1 4 1 1 1 1 2 1 1 4 1 1 5 1 N = 5, M = 2000, pos = -1 8 8 3 1 2 5 2 3 3 3 2 4 5 3 2 3 2 2 5 3 5 2 2 5 5 3 3 1 2 5 4 1 3 3 2 4 5 1 4 3 2 2 5 1 7 2 2 5 7 1 N = 5, M = 2000, pos = -1 2 4 2 1 5 1...
result:
wrong output format Expected integer, but "N" found
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 13908kb
input:
4 5 5 2000 0 6 15 10 1 5 2000 0 15 0 13 10 5 2000 0 5 7 5 1 5 2000 0 13 3 2 15 5 2000 0 2 4 7 0
output:
N = 5, M = 2000, pos = -1 2 5 2 1 5 1 1 2 2 5 1 1 2 4 5 1 1 1 5 2 1 1 2 N = 5, M = 2000, pos = -1 8 2 1 1 8 1 3 8 N = 5, M = 2000, pos = -1 4 2 2 2 5 1 3 2 4 5 1 3 N = 5, M = 2000, pos = -1 1 1 1 2 1 N = 5, M = 2000, pos = -1 1 4 1 1 1 1 2 1 1 3 1 1 5 1
result:
wrong output format Expected integer, but "N" found
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 26708kb
input:
5 5 6 2000 0 45 517 811 107 132 6 2000 0 382 576 805 419 579 6 2000 0 379 809 441 331 67 6 2000 0 565 776 959 852 383 6 2000 0 613 383 829 47 441
output:
N = 6, M = 2000, pos = -1 146 20 5 1 2 3 4 6 1 19 1 1 124 4 2 3 4 6 19 1 1 125 4 2 3 4 6 20 1 1 124 4 2 3 4 6 19 1 2 124 4 2 3 4 6 19 2 1 124 4 1 2 4 6 2 19 1 124 3 2 4 6 19 1 126 3 2 4 6 21 1 124 3 2 4 6 19 3 124 5 1 2 3 5 6 1 19 1 1 124 4 2 3 5 6 19 1 1 125 4 2 3 5 6 20 1 1 ...
result:
wrong output format Expected integer, but "N" found
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 28324kb
input:
6 5 6 2000 0 75 173 555 637 905 6 2000 0 934 118 906 367 728 6 2000 0 244 321 598 625 469 6 2000 0 573 489 24 480 459 6 2000 0 424 356 750 623 871
output:
N = 6, M = 2000, pos = -1 557 483 5 1 2 3 5 6 8 53 342 131 23 5 1 2 3 5 6 8 53 341 132 23 5 1 2 3 5 6 8 54 341 131 23 5 1 2 3 5 6 8 53 341 131 24 5 1 2 3 5 6 9 53 341 131 23 5 1 2 3 5 6 8 53 340 133 23 5 1 2 3 5 6 8 53 339 134 23 5 1 2 3 5 6 8 54 339 133 23 5 1 2 3 5 6 8 53 339 133 ...
result:
wrong output format Expected integer, but "N" found
Test #7:
score: 0
Wrong Answer
time: 0ms
memory: 26708kb
input:
7 5 6 2000 0 886 972 226 813 407 6 2000 0 219 190 742 101 572 6 2000 0 590 423 516 1017 46 6 2000 0 388 807 207 205 647 6 2000 0 408 180 238 300 694
output:
N = 6, M = 2000, pos = -1 176 25 5 1 2 4 5 6 8 10 30 19 109 5 1 2 4 5 6 8 10 34 19 105 5 1 2 4 5 6 8 14 30 19 105 5 1 2 4 5 6 8 10 30 23 105 5 1 2 4 5 6 12 10 30 19 105 5 1 2 4 5 6 4 10 30 19 113 4 2 4 5 6 10 30 19 117 4 2 4 5 6 10 34 19 113 4 2 4 5 6 14 30 19 113 4 2 4 5 6 10 30 ...
result:
wrong output format Expected integer, but "N" found
Test #8:
score: 0
Wrong Answer
time: 78ms
memory: 103428kb
input:
8 257 100000 100 32768 65536 262144 32768 8388608 1048576 4 67108864 16384 32768 262144 8192 512 134217728 65536 4194304 262144 67108864 1024 262144 64 32 65536 2097152 268435456 1 2048 4194304 16777216 8 16384 2 2048 16777216 268435456 262144 1048576 8388608 16 268435456 2 128 4194304 262144 32768 ...
output:
N = 100000, M = 100, pos = -1 303389274 100 13 2969 7812 19013 20900 22780 23323 47707 66185 72794 75007 82825 96252 98412 16 1048576 8 2 2048 33554432 65536 268435456 262144 64 16384 512 4096 13 2969 7812 19013 22780 23323 47707 54137 66185 72794 75007 82825 96252 98412 16 1048576 8 2048 3355443...
result:
wrong output format Expected integer, but "N" found
Test #9:
score: 0
Wrong Answer
time: 84ms
memory: 103380kb
input:
9 266 100000 100 134217728 524288 8388608 4 8 8388608 33554432 4 536870912 4 16 8 33554432 33554432 256 65536 8 16 64 8 256 2048 268435456 256 8192 2 1024 65536 32 2048 134217728 8 1048576 8 16777216 33554432 1024 33554432 131072 16 2 33554432 8192 512 4194304 2048 268435456 256 536870912 16777216 1...
output:
N = 100000, M = 100, pos = -1 269988539 100 15 3191 8800 13094 18879 20505 28387 45127 47324 48725 51362 63297 65387 79655 83906 95658 65536 1048576 16 131072 262144 8192 268435456 32 2 128 512 1 8 4096 32768 15 3191 8800 13094 18879 20505 28387 45127 47324 48725 51362 63297 79655 83906 88655 9565...
result:
wrong output format Expected integer, but "N" found
Test #10:
score: 0
Wrong Answer
time: 77ms
memory: 104276kb
input:
10 269 100000 100 1048576 2 64 67108864 1024 67108864 268435456 32768 8388608 32 256 2 268435456 262144 524288 262144 2 524288 64 8192 262144 536870912 2097152 64 1024 2 1048576 128 2 8388608 512 32768 1 8388608 4 2 268435456 128 67108864 65536 2 8388608 2048 16 2048 4096 32768 1048576 32768 32 8388...
output:
N = 100000, M = 100, pos = -1 471323918 100 15 10944 13832 22186 28679 32345 34321 34921 37491 57749 60228 64404 72229 78998 87356 90282 134217728 16384 262144 131072 2 4096 65536 268435456 256 1048576 4 8 32768 67108864 1024 15 10944 13832 22186 28679 34321 34921 37491 57537 57749 60228 64404 722...
result:
wrong output format Expected integer, but "N" found
Test #11:
score: 0
Wrong Answer
time: 140ms
memory: 96596kb
input:
11 2323 100000 1 0 3170633 888529329 347839787 101667249 273239696 1028446182 411994109 710973319 298677951 299452068 519308796 361451040 488605068 74238166 997794448 478367019 532094220 747266199 217905213 682359917 774814810 234838947 456387659 38459020 434013070 633290806 173828476 94076883 56828...
output:
N = 100000, M = 1, pos = -1 11962 1 15 5529 8448 16611 22938 33798 35551 38129 47454 49541 58413 77917 78515 88140 90198 91315 19 54 1 1 8212 1 139 1 2165 1 1 1364 1 1 1 N = 37, M = 1, pos = -1 1607036 1 11 4 6 7 12 15 16 22 26 28 29 36 65471 32512 6 520064 978944 6136 3836 4 60 2 1 N = 4, M = 1...
result:
wrong output format Expected integer, but "N" found
Test #12:
score: 0
Wrong Answer
time: 138ms
memory: 92896kb
input:
12 2205 100000 1 0 684191025 220215685 982495864 602362406 687396179 439432236 81065680 398068897 269754402 306183653 309939439 664994998 1011962742 338161922 629593565 926305057 1026259775 711874360 69406110 426672919 208267066 551253027 9384823 26156203 778817402 654214308 527029151 1065024353 287...
output:
N = 100000, M = 1, pos = -1 22539 1 18 7587 8561 9642 11813 14681 18803 21599 21755 38540 38873 39551 41069 66449 85627 86392 89268 92825 94909 1 1 18405 5 1 1 2826 1 14 846 1 1 1 1 1 404 28 1 N = 38, M = 1, pos = -1 5296170 1 10 3 8 9 11 12 16 19 20 30 38 2 1048320 64 4194240 30 6142 31744 15360...
result:
wrong output format Expected integer, but "N" found
Test #13:
score: 0
Wrong Answer
time: 146ms
memory: 88692kb
input:
13 2166 100000 1 0 58930516 543560994 783997157 728082180 789115629 549794748 81818067 214839912 203394814 711969322 908524000 570262778 992867922 359455295 88035653 412186516 937931728 331800409 545354553 535440658 894562512 657466952 555070606 469471475 1055263866 874958292 76960239 478302168 6800...
output:
N = 100000, M = 1, pos = -1 8241 1 16 66 7632 19253 26786 29190 29655 32070 33285 54258 55463 66513 68234 72809 80763 82425 95831 63 1 1 5 7798 1 1 1 156 1 1 192 4 1 14 1 N = 5, M = 1, pos = -1 2846999 1 4 1 2 4 5 131072 103522 2049874 562531 N = 23, M = 1, pos = -1 1605 1 6 1 2 6 8 12 23 1 1 9...
result:
wrong output format Expected integer, but "N" found
Test #14:
score: 0
Wrong Answer
time: 1ms
memory: 67156kb
input:
14 23 1000 10 0 357293452 452461848 986047039 546588280 762710079 767831017 39741545 416114273 515599366 1018969624 603342125 928112286 1053016142 240953466 533088067 1028134429 504727014 371307863 834428873 968387878 478550336 1047217797 1046651542 777749850 866989319 92995163 251915198 363285573 1...
output:
N = 1000, M = 10, pos = -1 264227 10 12 134 203 355 565 651 656 673 786 876 955 996 999 5 2638 9 531 1 1 1 697 251113 10 5226 3995 12 134 203 355 565 651 673 692 786 876 955 996 999 5 2638 9 531 1 1 1 697 251113 10 5226 3995 12 134 203 355 565 651 673 688 786 876 955 996 999 5 2638 9 531 1 1 1 ...
result:
wrong output format Expected integer, but "N" found
Test #15:
score: 0
Wrong Answer
time: 0ms
memory: 67152kb
input:
15 23 1000 10 0 978686021 287986921 276311856 889616598 739968417 1060147652 463275477 172393699 591333230 983197307 235514434 330494755 449056272 882229818 781111474 275587745 980041928 334198691 305313012 415758352 947298893 950211162 909723054 961622596 917454340 161928901 404346316 369133631 103...
output:
N = 1000, M = 10, pos = -1 709905 10 15 32 206 279 283 406 482 656 677 727 785 842 904 917 977 978 56 1 3862 6 1 12836 4 1 47 1 693086 1 1 1 1 15 32 206 279 283 435 482 656 677 727 785 842 904 917 977 978 56 1 3862 6 1 12836 4 1 47 1 693086 1 1 1 1 15 32 206 279 283 482 656 677 727 770 785 842 9...
result:
wrong output format Expected integer, but "N" found
Test #16:
score: 0
Wrong Answer
time: 3ms
memory: 67148kb
input:
16 15 1000 10 0 631723071 149784582 965844254 515554472 887253148 467825521 981769969 1054193550 627909969 590277818 159342752 658063143 667914173 169490051 25536270 337269419 1056885019 980490575 750858271 553446484 347553447 376197986 1053224035 473470890 123586 97769047 761755924 510998818 256094...
output:
N = 1000, M = 10, pos = -1 737485 10 15 172 265 287 384 474 542 553 574 599 625 747 790 831 880 924 27 227 1 215546 2917 1 1 1 6 7 87404 1600 16 41649 388082 15 172 265 287 384 474 553 574 587 599 625 747 790 831 880 924 27 227 1 215546 2917 1 1 1 6 7 87404 1600 16 41649 388082 15 172 265 287 38...
result:
wrong output format Expected integer, but "N" found
Test #17:
score: 0
Wrong Answer
time: 1ms
memory: 69200kb
input:
17 25 1000 10 0 751950140 901599329 987895071 306253500 278530668 539473653 911723672 948474628 722632384 369217860 428703545 999113214 567923990 53499297 1013528916 263060554 669297221 349021033 832596533 893306880 892438572 345611286 331257977 488113061 578929864 881846255 320356815 76057168 70469...
output:
N = 1000, M = 10, pos = -1 1119212 10 14 97 122 215 236 396 431 528 552 576 617 717 887 920 950 7 5641 149775 107 1 6002 26620 674 1237 1 6239 922903 1 4 14 97 122 215 236 396 424 431 528 552 576 717 887 920 950 7 5641 149775 107 1 1 6002 26620 674 1237 6239 922903 1 4 14 97 122 215 236 396 431 ...
result:
wrong output format Expected integer, but "N" found
Test #18:
score: 0
Wrong Answer
time: 112ms
memory: 91964kb
input:
18 195 100000 1000 0 828483622 617711013 242092397 1034026464 456205583 731635466 382894773 533786631 582730039 74863848 661821965 368857719 541353387 662605236 580923280 798012506 54823622 333416217 39292129 995195996 477140985 1014499425 362164396 970752859 879997855 96768859 1005365898 576674982 ...
output:
N = 100000, M = 1000, pos = -1 23456 1000 17 7223 7904 8651 12609 26970 27646 27720 33450 36223 40293 42303 47649 67002 70487 94288 94649 96808 1743 1 3 20988 34 4 1 1 1 1 1 1 1 3 279 1 393 17 7223 7904 8651 12609 26970 27646 27720 33450 40293 42303 47649 66379 67002 70487 94288 94649 96808 1743 ...
result:
wrong output format Expected integer, but "N" found
Test #19:
score: 0
Wrong Answer
time: 109ms
memory: 94016kb
input:
19 228 100000 1000 0 230727359 951312015 741711018 367230626 775024687 130794976 435788836 781961691 736694220 427610697 1016199868 798240399 340962994 1006804448 708169239 976753368 364431996 495851435 246658001 190094424 1054346726 639713727 218794912 229693460 313349630 85091951 418997497 2734590...
output:
N = 100000, M = 1000, pos = -1 5906 1000 18 18000 24594 27090 31031 36690 49706 57375 58900 60712 61471 63184 64350 66702 67455 67985 94039 97479 97656 1 1 1 2 71 1 2 1 11 1 28 1 1 3 4034 20 1071 656 18 18000 24594 27090 31031 36690 49706 57375 58900 60712 61471 63184 64350 66676 67455 67985 94039...
result:
wrong output format Expected integer, but "N" found
Test #20:
score: 0
Wrong Answer
time: 105ms
memory: 95432kb
input:
20 221 100000 1000 0 716795222 632538294 1008333912 248043863 1023411987 11954597 917179098 100756831 19780613 336926235 768679016 371044675 360783184 402042708 1056697208 567354265 284551620 146863144 1008241012 536649321 680142584 506474136 80860918 973856876 30288601 668537691 877380398 131785980...
output:
N = 100000, M = 1000, pos = -1 13893 1000 15 5978 8817 12957 23097 25849 31013 39313 49780 55719 66304 66582 68169 72889 82418 94588 1 307 22 1 1 10 1 2415 1 1 1 2 1 33 11096 15 5978 8817 12957 23097 25849 31013 39313 49780 55719 66304 66549 68169 72889 82418 94588 1 307 22 1 1 10 1 2415 1 1 1 2 ...
result:
wrong output format Expected integer, but "N" found
Test #21:
score: 0
Wrong Answer
time: 106ms
memory: 97828kb
input:
21 204 100000 1000 0 867143449 289720871 62880653 256495758 373546157 114942061 524281177 164218453 261500635 241690011 911469619 794136322 460604293 201667773 1001245336 873383805 136426866 731765422 1036091702 428463064 474020221 916532901 913755707 704796468 745115429 387268771 611877390 10158806...
output:
N = 100000, M = 1000, pos = -1 1241 1000 11 15233 17963 31953 47178 55333 65387 66676 66702 72308 79622 98425 1 132 1 11 1 1 119 1 970 1 3 11 15233 17963 31953 47178 55333 65387 66676 66681 72308 79622 98425 1 132 1 11 1 1 119 1 970 1 3 11 15233 17963 31953 47178 55333 65387 66676 66682 72308 79...
result:
wrong output format Expected integer, but "N" found
Test #22:
score: 0
Wrong Answer
time: 104ms
memory: 89624kb
input:
22 259 99999 1000 0 184042404 114860590 81955939 149152356 141033215 259145072 144981065 194732174 87943638 3239431 196977178 27923106 209711053 259763893 143914852 152580789 5161376 220134523 49139129 179593854 115442954 268238166 42599190 6509126 76156465 153820967 111093283 89981466 186373935 684...
output:
N = 99999, M = 1000, pos = -1 553 1000 13 2458 20569 26187 28126 34958 37309 55988 74516 77278 80853 87087 89485 89972 1 1 1 253 1 1 1 11 1 1 1 1 279 13 2458 20569 26187 28126 37309 55988 74516 77278 80853 82424 87087 89485 89972 1 1 1 253 1 1 11 1 1 1 1 1 279 13 2458 20569 26187 28126 37309 559...
result:
wrong output format Expected integer, but "N" found
Test #23:
score: 0
Wrong Answer
time: 96ms
memory: 91956kb
input:
23 229 99999 1000 0 67684423 27530736 262933500 210540490 87986446 142495215 8108489 162333902 7472566 74649932 22340176 96113149 105072940 96282592 479313 231805795 113210597 21907161 131354773 137785844 44861082 60046190 195538723 185926550 49537906 255986573 48373131 153611664 98228321 259354412 ...
output:
N = 99999, M = 1000, pos = -1 1406 1000 14 2510 7858 23217 25621 28521 32006 39604 40279 40342 42925 46982 73472 73671 88604 1 15 1 1 81 1 187 1 207 1 130 47 731 2 14 2510 7858 23217 25621 28521 39604 40279 40342 42925 46982 73472 73671 78797 88604 1 15 1 1 81 187 1 207 1 130 47 731 1 2 14 2510 ...
result:
wrong output format Expected integer, but "N" found
Test #24:
score: 0
Wrong Answer
time: 211ms
memory: 173128kb
input:
24 299 99999 2000 0 46856671573051356 144451722821279396 194202742420356088 42768202435393968 146930968341077918 121735975802283045 43381059403904591 9790356926653248 90585698509588415 182205406048046442 106698163084666387 83495547377102990 95530264027271484 151047337738852707 263069394355867183 215...
output:
N = 99999, M = 2000, pos = -1 3144886350134 0 N = 3, M = 2, pos = 46 171390666309632 0 N = 86, M = 100, pos = -1 40813686188869 0 N = 5, M = 14, pos = 2 9 14 4 1 2 3 5 6 1 1 1 3 1 2 3 7 1 1 3 1 2 3 6 1 2 3 1 2 3 6 2 1 3 1 3 5 6 1 2 2 1 3 8 1 2 1 3 6 3 4 1 2 3 5 2 1 5 1 3 1 2 3 3 1 5...
result:
wrong output format Expected integer, but "N" found
Test #25:
score: 0
Wrong Answer
time: 214ms
memory: 175064kb
input:
25 308 99999 2000 0 62481075687254565 108220925926439751 147822046782831506 143330595029626008 266264147751224285 261103833765129444 47417861284547971 240063309104990334 57610062682346847 86133126920120030 166996559481841953 262167570538721871 37862622740033692 1564310050448344 238599881630673329 84...
output:
N = 99999, M = 2000, pos = -1 1899280322188 0 N = 5, M = 100, pos = 38 618202410787 0 N = 5, M = 1, pos = 18 653774 1 4 2 3 4 5 3066 24 131004 519680 N = 4, M = 2, pos = -1 31775 2 3 1 2 3 2 29 31744 3 1 2 3 30 1 31744 N = 87, M = 100, pos = 56 156807277242969906 0 N = 50, M = 100, pos = -1 27...
result:
wrong output format Expected integer, but "N" found