QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#556513#8221. 多方计算275307894a80 107ms56232kbC++141.3kb2024-09-10 19:04:402024-09-10 19:04:40

Judging History

你现在查看的是最新测评结果

  • [2024-09-10 19:04:40]
  • 评测
  • 测评结果:80
  • 用时:107ms
  • 内存:56232kb
  • [2024-09-10 19:04:40]
  • 提交

answer

#include "mpc.h"

#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define eb emplace_back
#define all(x) x.begin(),x.end()
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;
#define Tp template<typename T>
#define Ts template<typename T,typename... Ar>
namespace Debug{
	Tp void _debug(char* f,T t){cerr<<f<<'='<<t<<endl;}
	Ts void _debug(char* f,T x,Ar... y){while(*f!=',') cerr<<*f++;cerr<<'='<<x<<",";_debug(f+1,y...);}
	#ifdef LOCAL
	#define gdb(...) _debug((char*)#__VA_ARGS__,__VA_ARGS__)
	#else 
	#define gdb(...) void()
	#endif
}using namespace Debug;
int mm,nn;
int precalc(int n,int m){
	mm=m;nn=n;
	return n+m+3;
}

bool transmit(player &player, int round,int position){
	int p=(round>=position+1?round-position-1:mm+4-(position-round)%15);
	if(p<0) return 0;
	player.memory[p]+=player.last_message;
	for(int i=p;player.memory[i]>=2;i++) player.memory[i]-=2,player.memory[i+1]++;
	int w=player.memory[p];
	if(round<=position&&position^nn) player.memory[p]=0;
	return w;
}

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 6000kb

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187658

result:

ok Perfect. 10

Test #2:

score: 10
Accepted
time: 1ms
memory: 5952kb

input:

5 5 3552483843587513799 14478819593833617714

output:

4123764187658

result:

ok Perfect. 10

Test #3:

score: 10
Accepted
time: 1ms
memory: 6004kb

input:

5 5 1049434279474537131 1049728252928449771

output:

4123764187658

result:

ok Perfect. 10

Test #4:

score: 10
Accepted
time: 1ms
memory: 6020kb

input:

5 5 8922384302424007645 1173548755077470934

output:

4123764187658

result:

ok Perfect. 10

Test #5:

score: 10
Accepted
time: 1ms
memory: 6024kb

input:

5 5 10436985171519237349 6372260076854600203

output:

4123764187658

result:

ok Perfect. 10

Test #6:

score: 10
Accepted
time: 1ms
memory: 5948kb

input:

5 5 3969271731891539589 872380446563047377

output:

4123764187658

result:

ok Perfect. 10

Test #7:

score: 10
Accepted
time: 1ms
memory: 5956kb

input:

5 5 10791248432551339097 10907238234860663613

output:

4123764187658

result:

ok Perfect. 10

Test #8:

score: 10
Accepted
time: 1ms
memory: 5936kb

input:

5 5 4133452284370185751 8351536681439074389

output:

4123764187658

result:

ok Perfect. 10

Test #9:

score: 10
Accepted
time: 1ms
memory: 6020kb

input:

5 5 4588466072500947787 2668799652971323944

output:

4123764187658

result:

ok Perfect. 10

Test #10:

score: 10
Accepted
time: 1ms
memory: 5948kb

input:

5 5 14152525429264304911 13775135703660625045

output:

4123764187658

result:

ok Perfect. 10

Test #11:

score: 10
Accepted
time: 1ms
memory: 7924kb

input:

5 5 7421526808561975748 10544499515413224856

output:

4123764187658

result:

ok Perfect. 10

Test #12:

score: 10
Accepted
time: 1ms
memory: 5960kb

input:

5 5 10533068226990172617 16920379813521486362

output:

4123764187658

result:

ok Perfect. 10

Test #13:

score: 10
Accepted
time: 1ms
memory: 5956kb

input:

5 5 12984923981069466020 10402168891728084823

output:

4123764187658

result:

ok Perfect. 10

Test #14:

score: 10
Accepted
time: 1ms
memory: 6012kb

input:

5 5 4547699393608837176 17811338561394180193

output:

4123764187658

result:

ok Perfect. 10

Test #15:

score: 10
Accepted
time: 1ms
memory: 6004kb

input:

5 5 7797814030854767695 12994778421940209897

output:

4123764187658

result:

ok Perfect. 10

Test #16:

score: 10
Accepted
time: 1ms
memory: 8020kb

input:

5 5 13586090146748389854 8573353291555348877

output:

4123764187658

result:

ok Perfect. 10

Test #17:

score: 10
Accepted
time: 1ms
memory: 5948kb

input:

5 5 7492677468637862337 17412579963708759713

output:

4123764187658

result:

ok Perfect. 10

Test #18:

score: 10
Accepted
time: 1ms
memory: 5936kb

input:

5 5 12538610689378370624 10934031436815865430

output:

4123764187658

result:

ok Perfect. 10

Test #19:

score: 10
Accepted
time: 1ms
memory: 5940kb

input:

5 5 6318529188948278594 4765084946625953274

output:

4123764187658

result:

ok Perfect. 10

Test #20:

score: 10
Accepted
time: 1ms
memory: 5940kb

input:

5 5 12764462787770553234 16031550997283183642

output:

4123764187658

result:

ok Perfect. 10

Test #21:

score: 10
Accepted
time: 1ms
memory: 6008kb

input:

5 5 16850625473722229566 12858849229956583645

output:

4123764187658

result:

ok Perfect. 10

Test #22:

score: 10
Accepted
time: 1ms
memory: 6128kb

input:

5 5 3916752702561709368 14568996895902750709

output:

4123764187658

result:

ok Perfect. 10

Test #23:

score: 10
Accepted
time: 1ms
memory: 5992kb

input:

5 5 2793964619809963444 14799430123914266097

output:

4123764187658

result:

ok Perfect. 10

Test #24:

score: 10
Accepted
time: 1ms
memory: 5976kb

input:

5 5 14022384786197322639 15644367891444293842

output:

4123764187658

result:

ok Perfect. 10

Test #25:

score: 10
Accepted
time: 1ms
memory: 5984kb

input:

5 5 4677661251438971503 7860382546781589019

output:

4123764187658

result:

ok Perfect. 10

Test #26:

score: 10
Accepted
time: 1ms
memory: 6024kb

input:

5 5 865745884266339793 3234925754863119957

output:

4123764187658

result:

ok Perfect. 10

Test #27:

score: 10
Accepted
time: 1ms
memory: 6008kb

input:

5 5 16601073251043052245 5101181031338699631

output:

4123764187658

result:

ok Perfect. 10

Test #28:

score: 10
Accepted
time: 1ms
memory: 6012kb

input:

5 5 4666335567338264413 17869704479146009894

output:

4123764187658

result:

ok Perfect. 10

Test #29:

score: 10
Accepted
time: 1ms
memory: 6068kb

input:

5 5 10276076269669835904 6933906736047769186

output:

4123764187658

result:

ok Perfect. 10

Test #30:

score: 10
Accepted
time: 1ms
memory: 6020kb

input:

5 5 3547072148765339907 5805660413096765891

output:

4123764187658

result:

ok Perfect. 10

Test #31:

score: 10
Accepted
time: 1ms
memory: 6132kb

input:

5 5 5905632931049428772 15089509813347254316

output:

4123764187658

result:

ok Perfect. 10

Test #32:

score: 10
Accepted
time: 1ms
memory: 6024kb

input:

5 5 6148686139569402051 6521476089554108987

output:

4123764187658

result:

ok Perfect. 10

Test #33:

score: 10
Accepted
time: 1ms
memory: 6072kb

input:

5 5 10293582518274215475 2676706070504789810

output:

4123764187658

result:

ok Perfect. 10

Test #34:

score: 10
Accepted
time: 1ms
memory: 5944kb

input:

5 5 6589510135221577212 2537901023039331965

output:

4123764187658

result:

ok Perfect. 10

Test #35:

score: 10
Accepted
time: 1ms
memory: 6016kb

input:

5 5 5329171491039567345 943883204937169735

output:

4123764187658

result:

ok Perfect. 10

Test #36:

score: 10
Accepted
time: 1ms
memory: 6016kb

input:

5 5 18153714120372683774 16958100625183201027

output:

4123764187658

result:

ok Perfect. 10

Subtask #2:

score: 10
Accepted

Test #37:

score: 10
Accepted
time: 15ms
memory: 32472kb

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187658

result:

ok Perfect. 10

Test #38:

score: 10
Accepted
time: 14ms
memory: 31004kb

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187658

result:

ok Perfect. 10

Test #39:

score: 10
Accepted
time: 14ms
memory: 30332kb

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187658

result:

ok Perfect. 10

Test #40:

score: 10
Accepted
time: 14ms
memory: 31492kb

input:

1000 1 9630334707439747607 4291049102998855878

output:

4123764187658

result:

ok Perfect. 10

Test #41:

score: 10
Accepted
time: 15ms
memory: 32344kb

input:

1000 1 14659313773847015835 5872125537220100813

output:

4123764187658

result:

ok Perfect. 10

Test #42:

score: 10
Accepted
time: 18ms
memory: 31640kb

input:

1000 1 8843810642295111463 9289549733703682079

output:

4123764187658

result:

ok Perfect. 10

Test #43:

score: 10
Accepted
time: 15ms
memory: 30824kb

input:

1000 1 12506531245496737504 16568422609970603828

output:

4123764187658

result:

ok Perfect. 10

Test #44:

score: 10
Accepted
time: 14ms
memory: 32076kb

input:

1000 1 1687678405863133532 5008244365647721871

output:

4123764187658

result:

ok Perfect. 10

Test #45:

score: 10
Accepted
time: 10ms
memory: 31696kb

input:

1000 1 521330378415348792 8325284866479671525

output:

4123764187658

result:

ok Perfect. 10

Test #46:

score: 10
Accepted
time: 14ms
memory: 31948kb

input:

1000 1 6611871207626880018 9817110237545272117

output:

4123764187658

result:

ok Perfect. 10

Test #47:

score: 10
Accepted
time: 13ms
memory: 31292kb

input:

1000 1 15306541734406271267 14703264691591359191

output:

4123764187658

result:

ok Perfect. 10

Test #48:

score: 10
Accepted
time: 11ms
memory: 32044kb

input:

1000 1 3566881709297895710 7594566018112860837

output:

4123764187658

result:

ok Perfect. 10

Test #49:

score: 10
Accepted
time: 14ms
memory: 32696kb

input:

1000 1 4397454027521899216 7721560744364225236

output:

4123764187658

result:

ok Perfect. 10

Test #50:

score: 10
Accepted
time: 9ms
memory: 31632kb

input:

1000 1 5142075432412851988 16742257564666708908

output:

4123764187658

result:

ok Perfect. 10

Test #51:

score: 10
Accepted
time: 11ms
memory: 32572kb

input:

1000 1 12044326647208924489 2167359237561753365

output:

4123764187658

result:

ok Perfect. 10

Test #52:

score: 10
Accepted
time: 19ms
memory: 31088kb

input:

1000 1 16253907834346424870 11108645373354737991

output:

4123764187658

result:

ok Perfect. 10

Test #53:

score: 10
Accepted
time: 15ms
memory: 31796kb

input:

1000 1 16626499607125776891 8356934117282130057

output:

4123764187658

result:

ok Perfect. 10

Test #54:

score: 10
Accepted
time: 15ms
memory: 32020kb

input:

1000 1 3282168031615086167 3657599301669157549

output:

4123764187658

result:

ok Perfect. 10

Test #55:

score: 10
Accepted
time: 14ms
memory: 31184kb

input:

1000 1 14215560210789593083 15626251936339749845

output:

4123764187658

result:

ok Perfect. 10

Test #56:

score: 10
Accepted
time: 13ms
memory: 31872kb

input:

1000 1 2190592376641362424 13403200408316995773

output:

4123764187658

result:

ok Perfect. 10

Test #57:

score: 10
Accepted
time: 13ms
memory: 31276kb

input:

1000 1 11465558394225010724 2496884116655812179

output:

4123764187658

result:

ok Perfect. 10

Test #58:

score: 10
Accepted
time: 14ms
memory: 31008kb

input:

1000 1 18276809344802529187 9561628486185706823

output:

4123764187658

result:

ok Perfect. 10

Test #59:

score: 10
Accepted
time: 14ms
memory: 32720kb

input:

1000 1 7860122780923461882 10042766163912380121

output:

4123764187658

result:

ok Perfect. 10

Test #60:

score: 10
Accepted
time: 13ms
memory: 30400kb

input:

1000 1 12388686810101047811 3399743554629441239

output:

4123764187658

result:

ok Perfect. 10

Test #61:

score: 10
Accepted
time: 18ms
memory: 30836kb

input:

1000 1 14427576709382087754 13171985723510234618

output:

4123764187658

result:

ok Perfect. 10

Test #62:

score: 10
Accepted
time: 11ms
memory: 31936kb

input:

1000 1 7668903319567597796 8075077151477112929

output:

4123764187658

result:

ok Perfect. 10

Test #63:

score: 10
Accepted
time: 18ms
memory: 30708kb

input:

1000 1 14122766694312513270 6279188681168230824

output:

4123764187658

result:

ok Perfect. 10

Test #64:

score: 10
Accepted
time: 18ms
memory: 31160kb

input:

1000 1 5699987051542490697 8384784519684171122

output:

4123764187658

result:

ok Perfect. 10

Test #65:

score: 10
Accepted
time: 13ms
memory: 30160kb

input:

1000 1 11830949407183123854 9439666782273874030

output:

4123764187658

result:

ok Perfect. 10

Test #66:

score: 10
Accepted
time: 7ms
memory: 31140kb

input:

1000 1 9554889270917528521 11260732977199304707

output:

4123764187658

result:

ok Perfect. 10

Test #67:

score: 10
Accepted
time: 18ms
memory: 30836kb

input:

1000 1 17459479638232299425 11063210786482562440

output:

4123764187658

result:

ok Perfect. 10

Test #68:

score: 10
Accepted
time: 11ms
memory: 30264kb

input:

1000 1 15086329177686012536 8242831546145677467

output:

4123764187658

result:

ok Perfect. 10

Test #69:

score: 10
Accepted
time: 14ms
memory: 30908kb

input:

1000 1 15745267644798804685 16686857765674424216

output:

4123764187658

result:

ok Perfect. 10

Test #70:

score: 10
Accepted
time: 10ms
memory: 30228kb

input:

1000 1 9660862519797395098 1310528139508248324

output:

4123764187658

result:

ok Perfect. 10

Test #71:

score: 10
Accepted
time: 19ms
memory: 32020kb

input:

1000 1 3951648867737539370 17836842425696853386

output:

4123764187658

result:

ok Perfect. 10

Test #72:

score: 10
Accepted
time: 15ms
memory: 31728kb

input:

1000 1 3683735297104135564 13137254066150313412

output:

4123764187658

result:

ok Perfect. 10

Subtask #3:

score: 10
Accepted

Test #73:

score: 10
Accepted
time: 19ms
memory: 30804kb

input:

1000 10 7581650225429700886 16046788410942473709

output:

4123764187658

result:

ok Perfect. 10

Test #74:

score: 10
Accepted
time: 11ms
memory: 30148kb

input:

1000 10 14537469660092572204 15487160242871277135

output:

4123764187658

result:

ok Perfect. 10

Test #75:

score: 10
Accepted
time: 19ms
memory: 31260kb

input:

1000 10 4971718706043853562 18391385355203803679

output:

4123764187658

result:

ok Perfect. 10

Test #76:

score: 10
Accepted
time: 11ms
memory: 30840kb

input:

1000 10 6220037268301995888 16278635752092714254

output:

4123764187658

result:

ok Perfect. 10

Test #77:

score: 10
Accepted
time: 11ms
memory: 31544kb

input:

1000 10 13003869813029460901 78867517061296991

output:

4123764187658

result:

ok Perfect. 10

Test #78:

score: 10
Accepted
time: 19ms
memory: 32492kb

input:

1000 10 4278268311277744902 4384469125163838694

output:

4123764187658

result:

ok Perfect. 10

Test #79:

score: 10
Accepted
time: 14ms
memory: 30152kb

input:

1000 10 12438753592825055167 17236482075173745548

output:

4123764187658

result:

ok Perfect. 10

Test #80:

score: 10
Accepted
time: 20ms
memory: 32032kb

input:

1000 10 17346747783364362211 7528000636140799043

output:

4123764187658

result:

ok Perfect. 10

Test #81:

score: 10
Accepted
time: 11ms
memory: 31724kb

input:

1000 10 4438938768454127105 11400849707395197330

output:

4123764187658

result:

ok Perfect. 10

Test #82:

score: 10
Accepted
time: 11ms
memory: 31780kb

input:

1000 10 12809855989060518335 16096479664532822701

output:

4123764187658

result:

ok Perfect. 10

Test #83:

score: 10
Accepted
time: 11ms
memory: 30108kb

input:

1000 10 1866324730478452587 12184760107709123044

output:

4123764187658

result:

ok Perfect. 10

Test #84:

score: 10
Accepted
time: 19ms
memory: 32772kb

input:

1000 10 3385557446066551060 13320063460899920438

output:

4123764187658

result:

ok Perfect. 10

Test #85:

score: 10
Accepted
time: 15ms
memory: 30680kb

input:

1000 10 2771533678859996832 4383486732818647108

output:

4123764187658

result:

ok Perfect. 10

Test #86:

score: 10
Accepted
time: 14ms
memory: 30736kb

input:

1000 10 12943117603886392628 4963239483087442233

output:

4123764187658

result:

ok Perfect. 10

Test #87:

score: 10
Accepted
time: 11ms
memory: 30380kb

input:

1000 10 2313703064704983170 6736870706983331092

output:

4123764187658

result:

ok Perfect. 10

Test #88:

score: 10
Accepted
time: 14ms
memory: 31460kb

input:

1000 10 15804969878376580290 3548856895358739838

output:

4123764187658

result:

ok Perfect. 10

Test #89:

score: 10
Accepted
time: 15ms
memory: 30772kb

input:

1000 10 9866080263333804889 8678830744093953826

output:

4123764187658

result:

ok Perfect. 10

Test #90:

score: 10
Accepted
time: 19ms
memory: 30268kb

input:

1000 10 6751820871136111185 8848658341608259639

output:

4123764187658

result:

ok Perfect. 10

Test #91:

score: 10
Accepted
time: 14ms
memory: 30748kb

input:

1000 10 11486054074739288989 2900919302828998560

output:

4123764187658

result:

ok Perfect. 10

Test #92:

score: 10
Accepted
time: 11ms
memory: 30176kb

input:

1000 10 13832119382569826953 13634361971260976354

output:

4123764187658

result:

ok Perfect. 10

Test #93:

score: 10
Accepted
time: 19ms
memory: 30916kb

input:

1000 10 4453410960153043101 13357409826523686900

output:

4123764187658

result:

ok Perfect. 10

Test #94:

score: 10
Accepted
time: 19ms
memory: 31360kb

input:

1000 10 6074878447994378931 9512185237100875326

output:

4123764187658

result:

ok Perfect. 10

Test #95:

score: 10
Accepted
time: 11ms
memory: 30232kb

input:

1000 10 12898383854853911815 17140959228886157821

output:

4123764187658

result:

ok Perfect. 10

Test #96:

score: 10
Accepted
time: 11ms
memory: 31644kb

input:

1000 10 17877803113382829335 6155994847379122253

output:

4123764187658

result:

ok Perfect. 10

Test #97:

score: 10
Accepted
time: 18ms
memory: 30744kb

input:

1000 10 5411127225557059691 8968502810098781048

output:

4123764187658

result:

ok Perfect. 10

Test #98:

score: 10
Accepted
time: 15ms
memory: 30720kb

input:

1000 10 12839765246681509765 16133659220449519045

output:

4123764187658

result:

ok Perfect. 10

Test #99:

score: 10
Accepted
time: 15ms
memory: 31956kb

input:

1000 10 10512080521412884683 4322091697636775176

output:

4123764187658

result:

ok Perfect. 10

Test #100:

score: 10
Accepted
time: 11ms
memory: 31288kb

input:

1000 10 14839041853446568063 2900577407895090280

output:

4123764187658

result:

ok Perfect. 10

Test #101:

score: 10
Accepted
time: 15ms
memory: 30892kb

input:

1000 10 555864648019475755 10623903714134539336

output:

4123764187658

result:

ok Perfect. 10

Test #102:

score: 10
Accepted
time: 14ms
memory: 31100kb

input:

1000 10 15351408694997586068 13018688820428928134

output:

4123764187658

result:

ok Perfect. 10

Test #103:

score: 10
Accepted
time: 12ms
memory: 32536kb

input:

1000 10 13781134732629544842 649106695383463671

output:

4123764187658

result:

ok Perfect. 10

Test #104:

score: 10
Accepted
time: 15ms
memory: 31684kb

input:

1000 10 13103921156463006132 6008463984240882840

output:

4123764187658

result:

ok Perfect. 10

Test #105:

score: 10
Accepted
time: 15ms
memory: 31692kb

input:

1000 10 13570315480591854059 16031003972511128594

output:

4123764187658

result:

ok Perfect. 10

Test #106:

score: 10
Accepted
time: 11ms
memory: 32448kb

input:

1000 10 939728067048422960 6572615564422233011

output:

4123764187658

result:

ok Perfect. 10

Test #107:

score: 10
Accepted
time: 15ms
memory: 31228kb

input:

1000 10 9730657778308128806 10818528495534558245

output:

4123764187658

result:

ok Perfect. 10

Test #108:

score: 10
Accepted
time: 11ms
memory: 31556kb

input:

1000 10 14993828721272206953 16844668633587754736

output:

4123764187658

result:

ok Perfect. 10

Subtask #4:

score: 10
Accepted

Test #109:

score: 10
Accepted
time: 16ms
memory: 30756kb

input:

1000 30 15510757929061591914 2629686482095382587

output:

4123764187658

result:

ok Perfect. 10

Test #110:

score: 10
Accepted
time: 16ms
memory: 32396kb

input:

1000 30 12801036214420587075 2037510991448894723

output:

4123764187658

result:

ok Perfect. 10

Test #111:

score: 10
Accepted
time: 16ms
memory: 32544kb

input:

1000 30 7278229868553719282 3031492496837408805

output:

4123764187658

result:

ok Perfect. 10

Test #112:

score: 10
Accepted
time: 12ms
memory: 32640kb

input:

1000 30 5023044253913195306 10430362173020596870

output:

4123764187658

result:

ok Perfect. 10

Test #113:

score: 10
Accepted
time: 16ms
memory: 31984kb

input:

1000 30 14375927177340504141 12571864925174024193

output:

4123764187658

result:

ok Perfect. 10

Test #114:

score: 10
Accepted
time: 12ms
memory: 32076kb

input:

1000 30 6670727120156260286 15892206295475225514

output:

4123764187658

result:

ok Perfect. 10

Test #115:

score: 10
Accepted
time: 16ms
memory: 31800kb

input:

1000 30 18286184159808909528 13065670740492976498

output:

4123764187658

result:

ok Perfect. 10

Test #116:

score: 10
Accepted
time: 15ms
memory: 31324kb

input:

1000 30 3954788336215976339 7442831602180175236

output:

4123764187658

result:

ok Perfect. 10

Test #117:

score: 10
Accepted
time: 18ms
memory: 32012kb

input:

1000 30 10952440412821131470 11349869625262155151

output:

4123764187658

result:

ok Perfect. 10

Test #118:

score: 10
Accepted
time: 16ms
memory: 32816kb

input:

1000 30 4085102339188936571 15739592000796325584

output:

4123764187658

result:

ok Perfect. 10

Test #119:

score: 10
Accepted
time: 19ms
memory: 32676kb

input:

1000 30 7706773163318195890 3352145088310669388

output:

4123764187658

result:

ok Perfect. 10

Test #120:

score: 10
Accepted
time: 16ms
memory: 31840kb

input:

1000 30 13777535526390279015 797289958402503269

output:

4123764187658

result:

ok Perfect. 10

Test #121:

score: 10
Accepted
time: 11ms
memory: 31428kb

input:

1000 30 8556325522564209758 17955966250807680816

output:

4123764187658

result:

ok Perfect. 10

Test #122:

score: 10
Accepted
time: 15ms
memory: 31396kb

input:

1000 30 7363924610757141722 7852137169585416368

output:

4123764187658

result:

ok Perfect. 10

Test #123:

score: 10
Accepted
time: 11ms
memory: 30912kb

input:

1000 30 10163937283778807635 11035337627209972542

output:

4123764187658

result:

ok Perfect. 10

Test #124:

score: 10
Accepted
time: 12ms
memory: 31100kb

input:

1000 30 15419757916046227848 4668909061116779908

output:

4123764187658

result:

ok Perfect. 10

Test #125:

score: 10
Accepted
time: 15ms
memory: 30896kb

input:

1000 30 672618169337249405 10664328148817883435

output:

4123764187658

result:

ok Perfect. 10

Test #126:

score: 10
Accepted
time: 18ms
memory: 31796kb

input:

1000 30 5063121585155974658 6755615366902454195

output:

4123764187658

result:

ok Perfect. 10

Test #127:

score: 10
Accepted
time: 11ms
memory: 31496kb

input:

1000 30 8558163706368102019 16841941454688543796

output:

4123764187658

result:

ok Perfect. 10

Test #128:

score: 10
Accepted
time: 15ms
memory: 31468kb

input:

1000 30 11662060158847358808 4797190117440167877

output:

4123764187658

result:

ok Perfect. 10

Test #129:

score: 10
Accepted
time: 9ms
memory: 32564kb

input:

1000 30 9073706970143758020 1582240709035328983

output:

4123764187658

result:

ok Perfect. 10

Test #130:

score: 10
Accepted
time: 16ms
memory: 32012kb

input:

1000 30 8186759472286953608 11105424148319609938

output:

4123764187658

result:

ok Perfect. 10

Test #131:

score: 10
Accepted
time: 11ms
memory: 31228kb

input:

1000 30 5847334012130682053 13320276639945825069

output:

4123764187658

result:

ok Perfect. 10

Test #132:

score: 10
Accepted
time: 15ms
memory: 30996kb

input:

1000 30 7443440158558308795 6887347845812589564

output:

4123764187658

result:

ok Perfect. 10

Test #133:

score: 10
Accepted
time: 15ms
memory: 32060kb

input:

1000 30 11305528358454252914 8295362506428551928

output:

4123764187658

result:

ok Perfect. 10

Test #134:

score: 10
Accepted
time: 9ms
memory: 32696kb

input:

1000 30 7384288505844391014 7960204400404678053

output:

4123764187658

result:

ok Perfect. 10

Test #135:

score: 10
Accepted
time: 11ms
memory: 31352kb

input:

1000 30 10321224009109632439 7081446363439574641

output:

4123764187658

result:

ok Perfect. 10

Test #136:

score: 10
Accepted
time: 12ms
memory: 31732kb

input:

1000 30 10471826671587974423 78480078006165212

output:

4123764187658

result:

ok Perfect. 10

Test #137:

score: 10
Accepted
time: 11ms
memory: 31368kb

input:

1000 30 16213211651888696440 8866465228901066804

output:

4123764187658

result:

ok Perfect. 10

Test #138:

score: 10
Accepted
time: 15ms
memory: 32124kb

input:

1000 30 8236660749725225398 3545587591468540112

output:

4123764187658

result:

ok Perfect. 10

Test #139:

score: 10
Accepted
time: 16ms
memory: 31780kb

input:

1000 30 6607466518388369970 797081879253700015

output:

4123764187658

result:

ok Perfect. 10

Test #140:

score: 10
Accepted
time: 18ms
memory: 30964kb

input:

1000 30 4813863740767819220 2202452198245940946

output:

4123764187658

result:

ok Perfect. 10

Test #141:

score: 10
Accepted
time: 16ms
memory: 30300kb

input:

1000 30 14559715038138208529 1495126237086538372

output:

4123764187658

result:

ok Perfect. 10

Test #142:

score: 10
Accepted
time: 15ms
memory: 30248kb

input:

1000 30 2994652599112894046 17803480398762623920

output:

4123764187658

result:

ok Perfect. 10

Test #143:

score: 10
Accepted
time: 11ms
memory: 31516kb

input:

1000 30 3586231851761129647 13277925850312293378

output:

4123764187658

result:

ok Perfect. 10

Test #144:

score: 10
Accepted
time: 11ms
memory: 31220kb

input:

1000 30 6336578536886788319 2675249028071512010

output:

4123764187658

result:

ok Perfect. 10

Subtask #5:

score: 10
Accepted

Test #145:

score: 10
Accepted
time: 1ms
memory: 5964kb

input:

3 1000 341353812123787886 3685575517089631424

output:

4123764187658

result:

ok Perfect. 10

Test #146:

score: 10
Accepted
time: 1ms
memory: 5920kb

input:

3 1000 17554024470069985393 14526118928412869541

output:

4123764187658

result:

ok Perfect. 10

Test #147:

score: 10
Accepted
time: 1ms
memory: 5924kb

input:

3 1000 11100872062048687810 2436800177126848628

output:

4123764187658

result:

ok Perfect. 10

Test #148:

score: 10
Accepted
time: 1ms
memory: 5920kb

input:

3 1000 12273008098306225590 16096411110101172825

output:

4123764187658

result:

ok Perfect. 10

Test #149:

score: 10
Accepted
time: 1ms
memory: 5916kb

input:

3 1000 5654804106297455579 15032882241153944630

output:

4123764187658

result:

ok Perfect. 10

Test #150:

score: 10
Accepted
time: 1ms
memory: 5924kb

input:

3 1000 11657166324406481549 9353824690667677565

output:

4123764187658

result:

ok Perfect. 10

Test #151:

score: 10
Accepted
time: 1ms
memory: 5912kb

input:

3 1000 9856996265363358370 1303189576722459924

output:

4123764187658

result:

ok Perfect. 10

Test #152:

score: 10
Accepted
time: 1ms
memory: 5996kb

input:

3 1000 13762958351315737777 17656605426995507653

output:

4123764187658

result:

ok Perfect. 10

Test #153:

score: 10
Accepted
time: 1ms
memory: 5996kb

input:

3 1000 6594820974237499008 8275191558646832971

output:

4123764187658

result:

ok Perfect. 10

Test #154:

score: 10
Accepted
time: 0ms
memory: 5908kb

input:

3 1000 15364608258723563115 6775374271333152271

output:

4123764187658

result:

ok Perfect. 10

Test #155:

score: 10
Accepted
time: 1ms
memory: 8036kb

input:

3 1000 8632788633816311118 11344661582645288445

output:

4123764187658

result:

ok Perfect. 10

Test #156:

score: 10
Accepted
time: 0ms
memory: 5960kb

input:

3 1000 3761871134959282714 6665092712492706442

output:

4123764187658

result:

ok Perfect. 10

Test #157:

score: 10
Accepted
time: 1ms
memory: 5980kb

input:

3 1000 7094498594234606872 8910549019427251768

output:

4123764187658

result:

ok Perfect. 10

Test #158:

score: 10
Accepted
time: 1ms
memory: 5988kb

input:

3 1000 3150940857228445655 13881058163925087748

output:

4123764187658

result:

ok Perfect. 10

Test #159:

score: 10
Accepted
time: 1ms
memory: 5924kb

input:

3 1000 4138134701063904295 1719971509658971853

output:

4123764187658

result:

ok Perfect. 10

Test #160:

score: 10
Accepted
time: 0ms
memory: 5988kb

input:

3 1000 5958659699359151667 2414251605389031835

output:

4123764187658

result:

ok Perfect. 10

Test #161:

score: 10
Accepted
time: 1ms
memory: 5964kb

input:

3 1000 5944678764869264249 12798935463560265075

output:

4123764187658

result:

ok Perfect. 10

Test #162:

score: 10
Accepted
time: 1ms
memory: 6044kb

input:

3 1000 4284102408051741763 14814507977658888488

output:

4123764187658

result:

ok Perfect. 10

Test #163:

score: 10
Accepted
time: 1ms
memory: 5988kb

input:

3 1000 68627333965422180 112502394402464737

output:

4123764187658

result:

ok Perfect. 10

Test #164:

score: 10
Accepted
time: 1ms
memory: 5924kb

input:

3 1000 9425733985639080184 7223503398227154738

output:

4123764187658

result:

ok Perfect. 10

Test #165:

score: 10
Accepted
time: 1ms
memory: 5968kb

input:

3 1000 8943577954292636643 17050920714073219153

output:

4123764187658

result:

ok Perfect. 10

Test #166:

score: 10
Accepted
time: 1ms
memory: 6108kb

input:

3 1000 11496811535444871688 17614364677931546223

output:

4123764187658

result:

ok Perfect. 10

Test #167:

score: 10
Accepted
time: 1ms
memory: 5976kb

input:

3 1000 11326082696967067008 15441004054432712190

output:

4123764187658

result:

ok Perfect. 10

Test #168:

score: 10
Accepted
time: 1ms
memory: 5924kb

input:

3 1000 674874697473693630 12649997796392211087

output:

4123764187658

result:

ok Perfect. 10

Test #169:

score: 10
Accepted
time: 0ms
memory: 6100kb

input:

3 1000 1277251190199972050 14038814491796751538

output:

4123764187658

result:

ok Perfect. 10

Test #170:

score: 10
Accepted
time: 0ms
memory: 5920kb

input:

3 1000 9145151749445284299 14293688652236038951

output:

4123764187658

result:

ok Perfect. 10

Test #171:

score: 10
Accepted
time: 1ms
memory: 6104kb

input:

3 1000 15904416939287794082 14428505338208190980

output:

4123764187658

result:

ok Perfect. 10

Test #172:

score: 10
Accepted
time: 1ms
memory: 5996kb

input:

3 1000 6941291132256775130 12849312109895089494

output:

4123764187658

result:

ok Perfect. 10

Test #173:

score: 10
Accepted
time: 1ms
memory: 5980kb

input:

3 1000 17548422519337327843 202236826264518662

output:

4123764187658

result:

ok Perfect. 10

Test #174:

score: 10
Accepted
time: 1ms
memory: 5980kb

input:

3 1000 17860234706011656272 8403215217493848355

output:

4123764187658

result:

ok Perfect. 10

Test #175:

score: 10
Accepted
time: 0ms
memory: 8036kb

input:

3 1000 13237681186403336364 1756180179264870639

output:

4123764187658

result:

ok Perfect. 10

Test #176:

score: 10
Accepted
time: 1ms
memory: 5992kb

input:

3 1000 10003937773928046600 7429936390634919158

output:

4123764187658

result:

ok Perfect. 10

Test #177:

score: 10
Accepted
time: 1ms
memory: 5980kb

input:

3 1000 14525148579459393729 1812692019584178560

output:

4123764187658

result:

ok Perfect. 10

Test #178:

score: 10
Accepted
time: 0ms
memory: 5964kb

input:

3 1000 9397110039933932416 8176227936526769663

output:

4123764187658

result:

ok Perfect. 10

Test #179:

score: 10
Accepted
time: 1ms
memory: 5928kb

input:

3 1000 5937527883284015772 13220661886981109044

output:

4123764187658

result:

ok Perfect. 10

Test #180:

score: 10
Accepted
time: 1ms
memory: 5992kb

input:

3 1000 16390577403064012729 17586432346005845474

output:

4123764187658

result:

ok Perfect. 10

Subtask #6:

score: 10
Accepted

Test #181:

score: 10
Accepted
time: 1ms
memory: 6100kb

input:

10 1000 18326939717248212778 15447461170187547045

output:

4123764187658

result:

ok Perfect. 10

Test #182:

score: 10
Accepted
time: 1ms
memory: 6104kb

input:

10 1000 14303031343316484183 9472080590628751829

output:

4123764187658

result:

ok Perfect. 10

Test #183:

score: 10
Accepted
time: 1ms
memory: 6048kb

input:

10 1000 6233199299539916020 10372969863434063623

output:

4123764187658

result:

ok Perfect. 10

Test #184:

score: 10
Accepted
time: 1ms
memory: 8116kb

input:

10 1000 1320605970495772867 4274588898210052251

output:

4123764187658

result:

ok Perfect. 10

Test #185:

score: 10
Accepted
time: 1ms
memory: 5988kb

input:

10 1000 14667738752363126712 15543214327211267039

output:

4123764187658

result:

ok Perfect. 10

Test #186:

score: 10
Accepted
time: 1ms
memory: 6148kb

input:

10 1000 10274293415244696041 17671200215417759696

output:

4123764187658

result:

ok Perfect. 10

Test #187:

score: 10
Accepted
time: 1ms
memory: 6068kb

input:

10 1000 4129898547535974940 2097260917301158188

output:

4123764187658

result:

ok Perfect. 10

Test #188:

score: 10
Accepted
time: 1ms
memory: 6156kb

input:

10 1000 18342269208029532093 15215718152940184965

output:

4123764187658

result:

ok Perfect. 10

Test #189:

score: 10
Accepted
time: 1ms
memory: 6016kb

input:

10 1000 16324449487311799561 7257057435731061212

output:

4123764187658

result:

ok Perfect. 10

Test #190:

score: 10
Accepted
time: 1ms
memory: 8084kb

input:

10 1000 10598547070254751569 6031892680829982589

output:

4123764187658

result:

ok Perfect. 10

Test #191:

score: 10
Accepted
time: 0ms
memory: 6156kb

input:

10 1000 13928323168396069327 3069105625135055196

output:

4123764187658

result:

ok Perfect. 10

Test #192:

score: 10
Accepted
time: 0ms
memory: 6024kb

input:

10 1000 7599195458077868580 2945826695732953372

output:

4123764187658

result:

ok Perfect. 10

Test #193:

score: 10
Accepted
time: 1ms
memory: 6152kb

input:

10 1000 16598363586585449081 1440500051205705477

output:

4123764187658

result:

ok Perfect. 10

Test #194:

score: 10
Accepted
time: 1ms
memory: 6024kb

input:

10 1000 16806046847554949461 2043290592937055118

output:

4123764187658

result:

ok Perfect. 10

Test #195:

score: 10
Accepted
time: 1ms
memory: 6076kb

input:

10 1000 3412781614737162070 9157890737458129939

output:

4123764187658

result:

ok Perfect. 10

Test #196:

score: 10
Accepted
time: 1ms
memory: 6100kb

input:

10 1000 4929995236017118670 8805666030260933868

output:

4123764187658

result:

ok Perfect. 10

Test #197:

score: 10
Accepted
time: 1ms
memory: 6088kb

input:

10 1000 7054768874297620754 13274619671851658120

output:

4123764187658

result:

ok Perfect. 10

Test #198:

score: 10
Accepted
time: 1ms
memory: 6024kb

input:

10 1000 7528585877073359050 793284693053543078

output:

4123764187658

result:

ok Perfect. 10

Test #199:

score: 10
Accepted
time: 1ms
memory: 6100kb

input:

10 1000 12757899563936718782 4849101846511580591

output:

4123764187658

result:

ok Perfect. 10

Test #200:

score: 10
Accepted
time: 0ms
memory: 6088kb

input:

10 1000 12042451762321061777 6545871721881053425

output:

4123764187658

result:

ok Perfect. 10

Test #201:

score: 10
Accepted
time: 0ms
memory: 6104kb

input:

10 1000 7271935812956957572 10497459529945546802

output:

4123764187658

result:

ok Perfect. 10

Test #202:

score: 10
Accepted
time: 0ms
memory: 6104kb

input:

10 1000 6341439274689803684 14246348077672882158

output:

4123764187658

result:

ok Perfect. 10

Test #203:

score: 10
Accepted
time: 1ms
memory: 6108kb

input:

10 1000 3817682523043446725 5494962900415238875

output:

4123764187658

result:

ok Perfect. 10

Test #204:

score: 10
Accepted
time: 1ms
memory: 6024kb

input:

10 1000 8416959987199109088 17055829519218252994

output:

4123764187658

result:

ok Perfect. 10

Test #205:

score: 10
Accepted
time: 1ms
memory: 6148kb

input:

10 1000 1793119264835992157 1714507864697105513

output:

4123764187658

result:

ok Perfect. 10

Test #206:

score: 10
Accepted
time: 1ms
memory: 6100kb

input:

10 1000 7724528875454987642 1763061129361823916

output:

4123764187658

result:

ok Perfect. 10

Test #207:

score: 10
Accepted
time: 1ms
memory: 6028kb

input:

10 1000 11534422635927781263 4070139928445244316

output:

4123764187658

result:

ok Perfect. 10

Test #208:

score: 10
Accepted
time: 1ms
memory: 6040kb

input:

10 1000 15372080430015808791 16089397545846471516

output:

4123764187658

result:

ok Perfect. 10

Test #209:

score: 10
Accepted
time: 1ms
memory: 6104kb

input:

10 1000 6236739776451055601 16047865218788497420

output:

4123764187658

result:

ok Perfect. 10

Test #210:

score: 10
Accepted
time: 0ms
memory: 8152kb

input:

10 1000 14252413239239367160 1213233746428807014

output:

4123764187658

result:

ok Perfect. 10

Test #211:

score: 10
Accepted
time: 1ms
memory: 8000kb

input:

10 1000 18135377716189417455 5631819315037367158

output:

4123764187658

result:

ok Perfect. 10

Test #212:

score: 10
Accepted
time: 0ms
memory: 6072kb

input:

10 1000 975559190469584474 827633655855054297

output:

4123764187658

result:

ok Perfect. 10

Test #213:

score: 10
Accepted
time: 1ms
memory: 6092kb

input:

10 1000 1747065086398515576 5843112412157263265

output:

4123764187658

result:

ok Perfect. 10

Test #214:

score: 10
Accepted
time: 1ms
memory: 6160kb

input:

10 1000 10928581559530131120 11165431097660462799

output:

4123764187658

result:

ok Perfect. 10

Test #215:

score: 10
Accepted
time: 1ms
memory: 8124kb

input:

10 1000 5295255670083867030 1534392144514066093

output:

4123764187658

result:

ok Perfect. 10

Test #216:

score: 10
Accepted
time: 1ms
memory: 6156kb

input:

10 1000 9073389650834195843 13245215630127115996

output:

4123764187658

result:

ok Perfect. 10

Subtask #7:

score: 10
Accepted

Test #217:

score: 10
Accepted
time: 10ms
memory: 18612kb

input:

500 1000 3911210051670624968 2787181900148297327

output:

4123764187658

result:

ok Perfect. 10

Test #218:

score: 10
Accepted
time: 10ms
memory: 19092kb

input:

500 1000 12450618735493522488 12992043229059408722

output:

4123764187658

result:

ok Perfect. 10

Test #219:

score: 10
Accepted
time: 11ms
memory: 19056kb

input:

500 1000 11069062474421512571 11771283736385225888

output:

4123764187658

result:

ok Perfect. 10

Test #220:

score: 10
Accepted
time: 10ms
memory: 19008kb

input:

500 1000 12030437727196687278 3635786373293977777

output:

4123764187658

result:

ok Perfect. 10

Test #221:

score: 10
Accepted
time: 14ms
memory: 18868kb

input:

500 1000 3872073101711344974 12208640324328621987

output:

4123764187658

result:

ok Perfect. 10

Test #222:

score: 10
Accepted
time: 14ms
memory: 18728kb

input:

500 1000 7859510094425854878 16343987436452853527

output:

4123764187658

result:

ok Perfect. 10

Test #223:

score: 10
Accepted
time: 4ms
memory: 18532kb

input:

500 1000 10288842718408246821 14456646535715260536

output:

4123764187658

result:

ok Perfect. 10

Test #224:

score: 10
Accepted
time: 9ms
memory: 18476kb

input:

500 1000 18330187155668089188 15210445359162021609

output:

4123764187658

result:

ok Perfect. 10

Test #225:

score: 10
Accepted
time: 8ms
memory: 19776kb

input:

500 1000 2005856457032504585 99844445693740441

output:

4123764187658

result:

ok Perfect. 10

Test #226:

score: 10
Accepted
time: 14ms
memory: 18356kb

input:

500 1000 9453714621680340400 15495898881721491999

output:

4123764187658

result:

ok Perfect. 10

Test #227:

score: 10
Accepted
time: 14ms
memory: 18768kb

input:

500 1000 12075794770378620661 4976284918621589981

output:

4123764187658

result:

ok Perfect. 10

Test #228:

score: 10
Accepted
time: 15ms
memory: 20260kb

input:

500 1000 6308492247099916527 3369560637860859763

output:

4123764187658

result:

ok Perfect. 10

Test #229:

score: 10
Accepted
time: 14ms
memory: 19932kb

input:

500 1000 9284688836681251024 2426654752001937636

output:

4123764187658

result:

ok Perfect. 10

Test #230:

score: 10
Accepted
time: 9ms
memory: 19776kb

input:

500 1000 8040140754015568076 7491809528243903280

output:

4123764187658

result:

ok Perfect. 10

Test #231:

score: 10
Accepted
time: 9ms
memory: 18412kb

input:

500 1000 1853435739113625284 14515505623107861412

output:

4123764187658

result:

ok Perfect. 10

Test #232:

score: 10
Accepted
time: 9ms
memory: 18036kb

input:

500 1000 3574765122048236070 7219245209003197351

output:

4123764187658

result:

ok Perfect. 10

Test #233:

score: 10
Accepted
time: 10ms
memory: 18948kb

input:

500 1000 4142072214507982385 16054985080853226713

output:

4123764187658

result:

ok Perfect. 10

Test #234:

score: 10
Accepted
time: 14ms
memory: 18372kb

input:

500 1000 5595311565343228255 13845596039634954391

output:

4123764187658

result:

ok Perfect. 10

Test #235:

score: 10
Accepted
time: 10ms
memory: 20088kb

input:

500 1000 15769700446173674061 8921313218967163165

output:

4123764187658

result:

ok Perfect. 10

Test #236:

score: 10
Accepted
time: 14ms
memory: 20224kb

input:

500 1000 14308969058837646126 9989146294081471953

output:

4123764187658

result:

ok Perfect. 10

Test #237:

score: 10
Accepted
time: 14ms
memory: 20120kb

input:

500 1000 4344525014260164171 13328115656897753308

output:

4123764187658

result:

ok Perfect. 10

Test #238:

score: 10
Accepted
time: 14ms
memory: 19728kb

input:

500 1000 9502858057401844356 7517482290172991629

output:

4123764187658

result:

ok Perfect. 10

Test #239:

score: 10
Accepted
time: 10ms
memory: 19404kb

input:

500 1000 14329203628029783645 6994838492031596982

output:

4123764187658

result:

ok Perfect. 10

Test #240:

score: 10
Accepted
time: 14ms
memory: 19648kb

input:

500 1000 6584107806636516433 1734266347006898163

output:

4123764187658

result:

ok Perfect. 10

Test #241:

score: 10
Accepted
time: 9ms
memory: 19040kb

input:

500 1000 4730445570079162214 11200582368057666991

output:

4123764187658

result:

ok Perfect. 10

Test #242:

score: 10
Accepted
time: 10ms
memory: 19316kb

input:

500 1000 12131791478889318147 90425344672593305

output:

4123764187658

result:

ok Perfect. 10

Test #243:

score: 10
Accepted
time: 14ms
memory: 18972kb

input:

500 1000 15280519285615726848 3966718955736385323

output:

4123764187658

result:

ok Perfect. 10

Test #244:

score: 10
Accepted
time: 9ms
memory: 19504kb

input:

500 1000 13536864083748980255 7512705063977657212

output:

4123764187658

result:

ok Perfect. 10

Test #245:

score: 10
Accepted
time: 13ms
memory: 18592kb

input:

500 1000 2866529125325015539 4988250649359578060

output:

4123764187658

result:

ok Perfect. 10

Test #246:

score: 10
Accepted
time: 7ms
memory: 18980kb

input:

500 1000 8356632996470471082 1955281105770819807

output:

4123764187658

result:

ok Perfect. 10

Test #247:

score: 10
Accepted
time: 13ms
memory: 19664kb

input:

500 1000 5427148432621165391 1616532906209105227

output:

4123764187658

result:

ok Perfect. 10

Test #248:

score: 10
Accepted
time: 10ms
memory: 18360kb

input:

500 1000 7574907226142235517 7938509812046736092

output:

4123764187658

result:

ok Perfect. 10

Test #249:

score: 10
Accepted
time: 10ms
memory: 19044kb

input:

500 1000 12608804017168928181 12280392327171061624

output:

4123764187658

result:

ok Perfect. 10

Test #250:

score: 10
Accepted
time: 14ms
memory: 19508kb

input:

500 1000 3909115960984201676 14623615881690352862

output:

4123764187658

result:

ok Perfect. 10

Test #251:

score: 10
Accepted
time: 10ms
memory: 20296kb

input:

500 1000 11445898621212588459 14853333744180787627

output:

4123764187658

result:

ok Perfect. 10

Test #252:

score: 10
Accepted
time: 15ms
memory: 18848kb

input:

500 1000 18028780493452970759 10607315082558949410

output:

4123764187658

result:

ok Perfect. 10

Subtask #8:

score: 10
Accepted

Test #253:

score: 10
Accepted
time: 28ms
memory: 31680kb

input:

1000 1000 2442055921391744378 15448328346037637846

output:

4123764187658

result:

ok Perfect. 10

Test #254:

score: 10
Accepted
time: 31ms
memory: 31512kb

input:

1000 1000 16647476705341035385 17846374371867977517

output:

4123764187658

result:

ok Perfect. 10

Test #255:

score: 10
Accepted
time: 26ms
memory: 31796kb

input:

1000 1000 15269935845657062594 3733483100427089893

output:

4123764187658

result:

ok Perfect. 10

Test #256:

score: 10
Accepted
time: 27ms
memory: 32716kb

input:

1000 1000 7827255001840617549 14765536290277618109

output:

4123764187658

result:

ok Perfect. 10

Test #257:

score: 10
Accepted
time: 28ms
memory: 32364kb

input:

1000 1000 13701238499442576365 17227534761439395182

output:

4123764187658

result:

ok Perfect. 10

Test #258:

score: 10
Accepted
time: 24ms
memory: 31732kb

input:

1000 1000 14150694437641300095 7012253273483526176

output:

4123764187658

result:

ok Perfect. 10

Test #259:

score: 10
Accepted
time: 28ms
memory: 32512kb

input:

1000 1000 3209009366144994095 1260289214875388784

output:

4123764187658

result:

ok Perfect. 10

Test #260:

score: 10
Accepted
time: 24ms
memory: 31636kb

input:

1000 1000 9276259532615321589 16054182787553268415

output:

4123764187658

result:

ok Perfect. 10

Test #261:

score: 10
Accepted
time: 23ms
memory: 31016kb

input:

1000 1000 2376470501919743219 8454901431202341881

output:

4123764187658

result:

ok Perfect. 10

Test #262:

score: 10
Accepted
time: 29ms
memory: 31364kb

input:

1000 1000 8124003251140810684 17046112885743347876

output:

4123764187658

result:

ok Perfect. 10

Test #263:

score: 10
Accepted
time: 24ms
memory: 32436kb

input:

1000 1000 498046130035995054 9343896178609470666

output:

4123764187658

result:

ok Perfect. 10

Test #264:

score: 10
Accepted
time: 31ms
memory: 32164kb

input:

1000 1000 8232123788512164157 5380600461990799855

output:

4123764187658

result:

ok Perfect. 10

Test #265:

score: 10
Accepted
time: 27ms
memory: 32496kb

input:

1000 1000 17343086271442564004 17267253247072528546

output:

4123764187658

result:

ok Perfect. 10

Test #266:

score: 10
Accepted
time: 23ms
memory: 30096kb

input:

1000 1000 658571136895258792 1296511738645579222

output:

4123764187658

result:

ok Perfect. 10

Test #267:

score: 10
Accepted
time: 27ms
memory: 31972kb

input:

1000 1000 15280558666146147829 17361773959325783669

output:

4123764187658

result:

ok Perfect. 10

Test #268:

score: 10
Accepted
time: 19ms
memory: 31352kb

input:

1000 1000 16055592008216797890 12702482638735076729

output:

4123764187658

result:

ok Perfect. 10

Test #269:

score: 10
Accepted
time: 25ms
memory: 30952kb

input:

1000 1000 11844570679478259607 2259274649863893446

output:

4123764187658

result:

ok Perfect. 10

Test #270:

score: 10
Accepted
time: 23ms
memory: 31260kb

input:

1000 1000 13281855318000524085 12976753030014592542

output:

4123764187658

result:

ok Perfect. 10

Test #271:

score: 10
Accepted
time: 30ms
memory: 30816kb

input:

1000 1000 112965995807418418 5285593098042419225

output:

4123764187658

result:

ok Perfect. 10

Test #272:

score: 10
Accepted
time: 23ms
memory: 32672kb

input:

1000 1000 18428364413671739105 7824896363716141341

output:

4123764187658

result:

ok Perfect. 10

Test #273:

score: 10
Accepted
time: 27ms
memory: 30120kb

input:

1000 1000 4736043027026703934 18134536854010678826

output:

4123764187658

result:

ok Perfect. 10

Test #274:

score: 10
Accepted
time: 27ms
memory: 31248kb

input:

1000 1000 6801818849976207195 71142770362301839

output:

4123764187658

result:

ok Perfect. 10

Test #275:

score: 10
Accepted
time: 26ms
memory: 32088kb

input:

1000 1000 13049919169450950307 16349987534598898746

output:

4123764187658

result:

ok Perfect. 10

Test #276:

score: 10
Accepted
time: 28ms
memory: 30188kb

input:

1000 1000 12024034565628036956 16160528376115834715

output:

4123764187658

result:

ok Perfect. 10

Test #277:

score: 10
Accepted
time: 31ms
memory: 32552kb

input:

1000 1000 9380446667117198505 16132169379590613549

output:

4123764187658

result:

ok Perfect. 10

Test #278:

score: 10
Accepted
time: 30ms
memory: 30368kb

input:

1000 1000 8571066516910635762 79579533323815931

output:

4123764187658

result:

ok Perfect. 10

Test #279:

score: 10
Accepted
time: 24ms
memory: 31168kb

input:

1000 1000 8194775572854868253 4531404443373941922

output:

4123764187658

result:

ok Perfect. 10

Test #280:

score: 10
Accepted
time: 27ms
memory: 31972kb

input:

1000 1000 14010869570619320332 8495323777974553283

output:

4123764187658

result:

ok Perfect. 10

Test #281:

score: 10
Accepted
time: 26ms
memory: 31176kb

input:

1000 1000 12369822767539763512 11944264880251376849

output:

4123764187658

result:

ok Perfect. 10

Test #282:

score: 10
Accepted
time: 18ms
memory: 30200kb

input:

1000 1000 7036199069635679534 4587745873040737924

output:

4123764187658

result:

ok Perfect. 10

Test #283:

score: 10
Accepted
time: 27ms
memory: 32556kb

input:

1000 1000 15547761817816490088 5852030270042037434

output:

4123764187658

result:

ok Perfect. 10

Test #284:

score: 10
Accepted
time: 28ms
memory: 31948kb

input:

1000 1000 2323101367847953902 14133496205473203601

output:

4123764187658

result:

ok Perfect. 10

Test #285:

score: 10
Accepted
time: 28ms
memory: 32040kb

input:

1000 1000 13888293757058422846 15460976391506261936

output:

4123764187658

result:

ok Perfect. 10

Test #286:

score: 10
Accepted
time: 24ms
memory: 31652kb

input:

1000 1000 12566227964038476467 13432185697942495632

output:

4123764187658

result:

ok Perfect. 10

Test #287:

score: 10
Accepted
time: 27ms
memory: 31868kb

input:

1000 1000 10775094794255711589 16788170504560580934

output:

4123764187658

result:

ok Perfect. 10

Test #288:

score: 10
Accepted
time: 23ms
memory: 30912kb

input:

1000 1000 10071661744346988709 5598264466611788374

output:

4123764187658

result:

ok Perfect. 10

Subtask #9:

score: 0
Wrong Answer

Test #289:

score: 10
Accepted
time: 59ms
memory: 44904kb

input:

1500 1500 8660688640427922501 1436138393991664715

output:

4123764187658

result:

ok Perfect. 10

Test #290:

score: 0
Wrong Answer
time: 61ms
memory: 42272kb

input:

1500 1500 15821468721449590935 1370287063033011416

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #10:

score: 0
Wrong Answer

Test #325:

score: 0
Wrong Answer
time: 107ms
memory: 56232kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0