QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#523020#8221. 多方计算AdamGS#12 334ms57260kbC++231.3kb2024-08-17 18:46:472024-08-17 18:46:47

Judging History

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

  • [2024-08-17 18:46:47]
  • 评测
  • 测评结果:12
  • 用时:334ms
  • 内存:57260kb
  • [2024-08-17 18:46:47]
  • 提交

answer

#include "mpc.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
int precalc(int n, int m){
	/*int x=n+m, p=1;
	while(p<n) {
		p*=2;
		++x;
	}
	return x+1;*/
	return n+m+5;
}
void dodaj(player &player, int x, int car) {
	if(!car) return;
	for(int i=x; i<2200; ++i) {
		if(!car) return;
		if(car) {
			player.memory[i]^=1;
			if(player.memory[i]) car=0;
		}
	}
}
bool transmit(player &player, int round, int position){
	vector<int>N={0, 5, 1000, 1000, 1000, 3, 10, 500, 1000, 1500, 2000};
	vector<int>M={0, 5, 1, 10, 30, 1000, 1000, 1000, 1000, 1500, 2000};
	int subtask = 3; // do zmiany
	int n=N[subtask];
	int m=M[subtask];
	if(round>position) {
		dodaj(player, round-position-1, player.last_message);
		bool p=player.memory[round-position-1];
		if(position!=n) player.memory[round-position-1]=false;
		return p;
	}
	if(position-1>=12 && m-1-(position-12-1)+(round-2)>=0) {
		dodaj(player, m-1-(position-12-1)+(round-2), player.last_message);
	}
	if(position>=12 && m-1-(position-12)+(round-1)>=0) {
		bool p=player.memory[m-1-(position-12)+(round-1)];
		if(position!=n) player.memory[m-1-(position-12)+(round-1)]=false;
		return p;
	}
	return false;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 6
Acceptable Answer
time: 1ms
memory: 6220kb

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #2:

score: 0
Wrong Answer
time: 1ms
memory: 5872kb

input:

5 5 3552483843587513799 14478819593833617714

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #2:

score: 6
Acceptable Answer

Test #37:

score: 6
Acceptable Answer
time: 32ms
memory: 30752kb

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #38:

score: 6
Acceptable Answer
time: 32ms
memory: 30352kb

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #39:

score: 6
Acceptable Answer
time: 36ms
memory: 32696kb

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #40:

score: 6
Acceptable Answer
time: 36ms
memory: 30932kb

input:

1000 1 9630334707439747607 4291049102998855878

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #41:

score: 6
Acceptable Answer
time: 41ms
memory: 32848kb

input:

1000 1 14659313773847015835 5872125537220100813

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #42:

score: 6
Acceptable Answer
time: 39ms
memory: 31916kb

input:

1000 1 8843810642295111463 9289549733703682079

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #43:

score: 6
Acceptable Answer
time: 40ms
memory: 31444kb

input:

1000 1 12506531245496737504 16568422609970603828

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #44:

score: 6
Acceptable Answer
time: 40ms
memory: 31420kb

input:

1000 1 1687678405863133532 5008244365647721871

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #45:

score: 6
Acceptable Answer
time: 32ms
memory: 30992kb

input:

1000 1 521330378415348792 8325284866479671525

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #46:

score: 6
Acceptable Answer
time: 42ms
memory: 31224kb

input:

1000 1 6611871207626880018 9817110237545272117

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #47:

score: 6
Acceptable Answer
time: 44ms
memory: 32168kb

input:

1000 1 15306541734406271267 14703264691591359191

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #48:

score: 6
Acceptable Answer
time: 44ms
memory: 30872kb

input:

1000 1 3566881709297895710 7594566018112860837

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #49:

score: 6
Acceptable Answer
time: 43ms
memory: 32492kb

input:

1000 1 4397454027521899216 7721560744364225236

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #50:

score: 6
Acceptable Answer
time: 38ms
memory: 31812kb

input:

1000 1 5142075432412851988 16742257564666708908

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #51:

score: 6
Acceptable Answer
time: 41ms
memory: 32012kb

input:

1000 1 12044326647208924489 2167359237561753365

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #52:

score: 6
Acceptable Answer
time: 42ms
memory: 31680kb

input:

1000 1 16253907834346424870 11108645373354737991

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #53:

score: 6
Acceptable Answer
time: 32ms
memory: 32116kb

input:

1000 1 16626499607125776891 8356934117282130057

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #54:

score: 6
Acceptable Answer
time: 38ms
memory: 30236kb

input:

1000 1 3282168031615086167 3657599301669157549

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #55:

score: 6
Acceptable Answer
time: 35ms
memory: 30224kb

input:

1000 1 14215560210789593083 15626251936339749845

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #56:

score: 6
Acceptable Answer
time: 45ms
memory: 32324kb

input:

1000 1 2190592376641362424 13403200408316995773

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #57:

score: 6
Acceptable Answer
time: 43ms
memory: 32988kb

input:

1000 1 11465558394225010724 2496884116655812179

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #58:

score: 6
Acceptable Answer
time: 32ms
memory: 31668kb

input:

1000 1 18276809344802529187 9561628486185706823

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #59:

score: 6
Acceptable Answer
time: 39ms
memory: 30456kb

input:

1000 1 7860122780923461882 10042766163912380121

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #60:

score: 6
Acceptable Answer
time: 36ms
memory: 30336kb

input:

1000 1 12388686810101047811 3399743554629441239

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #61:

score: 6
Acceptable Answer
time: 37ms
memory: 31900kb

input:

1000 1 14427576709382087754 13171985723510234618

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #62:

score: 6
Acceptable Answer
time: 34ms
memory: 31956kb

input:

1000 1 7668903319567597796 8075077151477112929

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #63:

score: 6
Acceptable Answer
time: 40ms
memory: 31528kb

input:

1000 1 14122766694312513270 6279188681168230824

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #64:

score: 6
Acceptable Answer
time: 45ms
memory: 30796kb

input:

1000 1 5699987051542490697 8384784519684171122

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #65:

score: 6
Acceptable Answer
time: 40ms
memory: 31760kb

input:

1000 1 11830949407183123854 9439666782273874030

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #66:

score: 6
Acceptable Answer
time: 38ms
memory: 30908kb

input:

1000 1 9554889270917528521 11260732977199304707

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #67:

score: 6
Acceptable Answer
time: 42ms
memory: 31440kb

input:

1000 1 17459479638232299425 11063210786482562440

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #68:

score: 6
Acceptable Answer
time: 33ms
memory: 31248kb

input:

1000 1 15086329177686012536 8242831546145677467

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #69:

score: 6
Acceptable Answer
time: 43ms
memory: 30900kb

input:

1000 1 15745267644798804685 16686857765674424216

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #70:

score: 6
Acceptable Answer
time: 32ms
memory: 31792kb

input:

1000 1 9660862519797395098 1310528139508248324

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #71:

score: 6
Acceptable Answer
time: 46ms
memory: 32028kb

input:

1000 1 3951648867737539370 17836842425696853386

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #72:

score: 6
Acceptable Answer
time: 41ms
memory: 32596kb

input:

1000 1 3683735297104135564 13137254066150313412

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Subtask #3:

score: 6
Acceptable Answer

Test #73:

score: 6
Acceptable Answer
time: 37ms
memory: 32948kb

input:

1000 10 7581650225429700886 16046788410942473709

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #74:

score: 6
Acceptable Answer
time: 37ms
memory: 31936kb

input:

1000 10 14537469660092572204 15487160242871277135

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #75:

score: 6
Acceptable Answer
time: 41ms
memory: 30996kb

input:

1000 10 4971718706043853562 18391385355203803679

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #76:

score: 6
Acceptable Answer
time: 47ms
memory: 30164kb

input:

1000 10 6220037268301995888 16278635752092714254

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #77:

score: 6
Acceptable Answer
time: 36ms
memory: 31496kb

input:

1000 10 13003869813029460901 78867517061296991

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #78:

score: 6
Acceptable Answer
time: 37ms
memory: 31816kb

input:

1000 10 4278268311277744902 4384469125163838694

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #79:

score: 6
Acceptable Answer
time: 32ms
memory: 31252kb

input:

1000 10 12438753592825055167 17236482075173745548

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #80:

score: 6
Acceptable Answer
time: 38ms
memory: 31980kb

input:

1000 10 17346747783364362211 7528000636140799043

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #81:

score: 6
Acceptable Answer
time: 36ms
memory: 31376kb

input:

1000 10 4438938768454127105 11400849707395197330

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #82:

score: 6
Acceptable Answer
time: 32ms
memory: 30992kb

input:

1000 10 12809855989060518335 16096479664532822701

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #83:

score: 6
Acceptable Answer
time: 33ms
memory: 30008kb

input:

1000 10 1866324730478452587 12184760107709123044

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #84:

score: 6
Acceptable Answer
time: 41ms
memory: 31112kb

input:

1000 10 3385557446066551060 13320063460899920438

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #85:

score: 6
Acceptable Answer
time: 44ms
memory: 32440kb

input:

1000 10 2771533678859996832 4383486732818647108

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #86:

score: 6
Acceptable Answer
time: 34ms
memory: 32436kb

input:

1000 10 12943117603886392628 4963239483087442233

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #87:

score: 6
Acceptable Answer
time: 43ms
memory: 31920kb

input:

1000 10 2313703064704983170 6736870706983331092

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #88:

score: 6
Acceptable Answer
time: 35ms
memory: 31956kb

input:

1000 10 15804969878376580290 3548856895358739838

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #89:

score: 6
Acceptable Answer
time: 45ms
memory: 32600kb

input:

1000 10 9866080263333804889 8678830744093953826

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #90:

score: 6
Acceptable Answer
time: 34ms
memory: 31816kb

input:

1000 10 6751820871136111185 8848658341608259639

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #91:

score: 6
Acceptable Answer
time: 36ms
memory: 31044kb

input:

1000 10 11486054074739288989 2900919302828998560

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #92:

score: 6
Acceptable Answer
time: 35ms
memory: 31508kb

input:

1000 10 13832119382569826953 13634361971260976354

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #93:

score: 6
Acceptable Answer
time: 33ms
memory: 31396kb

input:

1000 10 4453410960153043101 13357409826523686900

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #94:

score: 6
Acceptable Answer
time: 44ms
memory: 31840kb

input:

1000 10 6074878447994378931 9512185237100875326

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #95:

score: 6
Acceptable Answer
time: 37ms
memory: 31076kb

input:

1000 10 12898383854853911815 17140959228886157821

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #96:

score: 6
Acceptable Answer
time: 38ms
memory: 31784kb

input:

1000 10 17877803113382829335 6155994847379122253

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #97:

score: 6
Acceptable Answer
time: 53ms
memory: 32788kb

input:

1000 10 5411127225557059691 8968502810098781048

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #98:

score: 6
Acceptable Answer
time: 36ms
memory: 30744kb

input:

1000 10 12839765246681509765 16133659220449519045

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #99:

score: 6
Acceptable Answer
time: 38ms
memory: 30704kb

input:

1000 10 10512080521412884683 4322091697636775176

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #100:

score: 6
Acceptable Answer
time: 37ms
memory: 31548kb

input:

1000 10 14839041853446568063 2900577407895090280

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #101:

score: 6
Acceptable Answer
time: 37ms
memory: 31436kb

input:

1000 10 555864648019475755 10623903714134539336

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #102:

score: 6
Acceptable Answer
time: 33ms
memory: 31132kb

input:

1000 10 15351408694997586068 13018688820428928134

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #103:

score: 6
Acceptable Answer
time: 30ms
memory: 31720kb

input:

1000 10 13781134732629544842 649106695383463671

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #104:

score: 6
Acceptable Answer
time: 36ms
memory: 30864kb

input:

1000 10 13103921156463006132 6008463984240882840

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #105:

score: 6
Acceptable Answer
time: 51ms
memory: 31988kb

input:

1000 10 13570315480591854059 16031003972511128594

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #106:

score: 6
Acceptable Answer
time: 39ms
memory: 31208kb

input:

1000 10 939728067048422960 6572615564422233011

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #107:

score: 6
Acceptable Answer
time: 50ms
memory: 32660kb

input:

1000 10 9730657778308128806 10818528495534558245

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Test #108:

score: 6
Acceptable Answer
time: 33ms
memory: 31172kb

input:

1000 10 14993828721272206953 16844668633587754736

output:

4123764187654

result:

points 0.60 Correct Answer. 6

Subtask #4:

score: 0
Wrong Answer

Test #109:

score: 0
Wrong Answer
time: 35ms
memory: 32268kb

input:

1000 30 15510757929061591914 2629686482095382587

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #5:

score: 0
Wrong Answer

Test #145:

score: 0
Wrong Answer
time: 0ms
memory: 5960kb

input:

3 1000 341353812123787886 3685575517089631424

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #6:

score: 0
Wrong Answer

Test #181:

score: 0
Wrong Answer
time: 2ms
memory: 6028kb

input:

10 1000 18326939717248212778 15447461170187547045

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #7:

score: 0
Wrong Answer

Test #217:

score: 0
Wrong Answer
time: 29ms
memory: 20184kb

input:

500 1000 3911210051670624968 2787181900148297327

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #8:

score: 0
Wrong Answer

Test #253:

score: 0
Wrong Answer
time: 79ms
memory: 31372kb

input:

1000 1000 2442055921391744378 15448328346037637846

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #9:

score: 0
Wrong Answer

Test #289:

score: 0
Wrong Answer
time: 176ms
memory: 42328kb

input:

1500 1500 8660688640427922501 1436138393991664715

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #10:

score: 0
Wrong Answer

Test #325:

score: 0
Wrong Answer
time: 334ms
memory: 57260kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0