QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#523021#8221. 多方计算AdamGS#16 324ms56236kbC++231.3kb2024-08-17 18:47:442024-08-17 18:47:44

Judging History

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

  • [2024-08-17 18:47:44]
  • 评测
  • 测评结果:16
  • 用时:324ms
  • 内存:56236kb
  • [2024-08-17 18:47:44]
  • 提交

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){
	return n+m+4;
}
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;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 8
Acceptable Answer
time: 1ms
memory: 7920kb

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #2:

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

input:

5 5 3552483843587513799 14478819593833617714

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #2:

score: 8
Acceptable Answer

Test #37:

score: 8
Acceptable Answer
time: 44ms
memory: 32980kb

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #38:

score: 8
Acceptable Answer
time: 35ms
memory: 31544kb

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #39:

score: 8
Acceptable Answer
time: 34ms
memory: 31516kb

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #40:

score: 8
Acceptable Answer
time: 45ms
memory: 31956kb

input:

1000 1 9630334707439747607 4291049102998855878

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #41:

score: 8
Acceptable Answer
time: 32ms
memory: 30236kb

input:

1000 1 14659313773847015835 5872125537220100813

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #42:

score: 8
Acceptable Answer
time: 34ms
memory: 32080kb

input:

1000 1 8843810642295111463 9289549733703682079

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #43:

score: 8
Acceptable Answer
time: 43ms
memory: 31512kb

input:

1000 1 12506531245496737504 16568422609970603828

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #44:

score: 8
Acceptable Answer
time: 36ms
memory: 31832kb

input:

1000 1 1687678405863133532 5008244365647721871

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #45:

score: 8
Acceptable Answer
time: 42ms
memory: 32492kb

input:

1000 1 521330378415348792 8325284866479671525

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #46:

score: 8
Acceptable Answer
time: 32ms
memory: 31432kb

input:

1000 1 6611871207626880018 9817110237545272117

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #47:

score: 8
Acceptable Answer
time: 40ms
memory: 32608kb

input:

1000 1 15306541734406271267 14703264691591359191

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #48:

score: 8
Acceptable Answer
time: 32ms
memory: 31332kb

input:

1000 1 3566881709297895710 7594566018112860837

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #49:

score: 8
Acceptable Answer
time: 32ms
memory: 31116kb

input:

1000 1 4397454027521899216 7721560744364225236

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #50:

score: 8
Acceptable Answer
time: 31ms
memory: 31548kb

input:

1000 1 5142075432412851988 16742257564666708908

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #51:

score: 8
Acceptable Answer
time: 40ms
memory: 31816kb

input:

1000 1 12044326647208924489 2167359237561753365

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #52:

score: 8
Acceptable Answer
time: 38ms
memory: 31352kb

input:

1000 1 16253907834346424870 11108645373354737991

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #53:

score: 8
Acceptable Answer
time: 42ms
memory: 31704kb

input:

1000 1 16626499607125776891 8356934117282130057

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #54:

score: 8
Acceptable Answer
time: 31ms
memory: 31216kb

input:

1000 1 3282168031615086167 3657599301669157549

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #55:

score: 8
Acceptable Answer
time: 36ms
memory: 31344kb

input:

1000 1 14215560210789593083 15626251936339749845

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #56:

score: 8
Acceptable Answer
time: 36ms
memory: 31176kb

input:

1000 1 2190592376641362424 13403200408316995773

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #57:

score: 8
Acceptable Answer
time: 36ms
memory: 31440kb

input:

1000 1 11465558394225010724 2496884116655812179

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #58:

score: 8
Acceptable Answer
time: 46ms
memory: 31152kb

input:

1000 1 18276809344802529187 9561628486185706823

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #59:

score: 8
Acceptable Answer
time: 32ms
memory: 32856kb

input:

1000 1 7860122780923461882 10042766163912380121

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #60:

score: 8
Acceptable Answer
time: 34ms
memory: 32352kb

input:

1000 1 12388686810101047811 3399743554629441239

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #61:

score: 8
Acceptable Answer
time: 32ms
memory: 31440kb

input:

1000 1 14427576709382087754 13171985723510234618

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #62:

score: 8
Acceptable Answer
time: 34ms
memory: 32448kb

input:

1000 1 7668903319567597796 8075077151477112929

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #63:

score: 8
Acceptable Answer
time: 36ms
memory: 32032kb

input:

1000 1 14122766694312513270 6279188681168230824

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #64:

score: 8
Acceptable Answer
time: 38ms
memory: 31700kb

input:

1000 1 5699987051542490697 8384784519684171122

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #65:

score: 8
Acceptable Answer
time: 36ms
memory: 30284kb

input:

1000 1 11830949407183123854 9439666782273874030

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #66:

score: 8
Acceptable Answer
time: 32ms
memory: 31464kb

input:

1000 1 9554889270917528521 11260732977199304707

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #67:

score: 8
Acceptable Answer
time: 34ms
memory: 31432kb

input:

1000 1 17459479638232299425 11063210786482562440

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #68:

score: 8
Acceptable Answer
time: 38ms
memory: 31548kb

input:

1000 1 15086329177686012536 8242831546145677467

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #69:

score: 8
Acceptable Answer
time: 36ms
memory: 30084kb

input:

1000 1 15745267644798804685 16686857765674424216

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #70:

score: 8
Acceptable Answer
time: 38ms
memory: 32196kb

input:

1000 1 9660862519797395098 1310528139508248324

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #71:

score: 8
Acceptable Answer
time: 36ms
memory: 32036kb

input:

1000 1 3951648867737539370 17836842425696853386

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #72:

score: 8
Acceptable Answer
time: 39ms
memory: 32256kb

input:

1000 1 3683735297104135564 13137254066150313412

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Subtask #3:

score: 8
Acceptable Answer

Test #73:

score: 8
Acceptable Answer
time: 33ms
memory: 32112kb

input:

1000 10 7581650225429700886 16046788410942473709

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #74:

score: 8
Acceptable Answer
time: 37ms
memory: 31568kb

input:

1000 10 14537469660092572204 15487160242871277135

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #75:

score: 8
Acceptable Answer
time: 39ms
memory: 31744kb

input:

1000 10 4971718706043853562 18391385355203803679

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #76:

score: 8
Acceptable Answer
time: 37ms
memory: 31180kb

input:

1000 10 6220037268301995888 16278635752092714254

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #77:

score: 8
Acceptable Answer
time: 32ms
memory: 32604kb

input:

1000 10 13003869813029460901 78867517061296991

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #78:

score: 8
Acceptable Answer
time: 38ms
memory: 31532kb

input:

1000 10 4278268311277744902 4384469125163838694

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #79:

score: 8
Acceptable Answer
time: 39ms
memory: 31152kb

input:

1000 10 12438753592825055167 17236482075173745548

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #80:

score: 8
Acceptable Answer
time: 36ms
memory: 31996kb

input:

1000 10 17346747783364362211 7528000636140799043

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #81:

score: 8
Acceptable Answer
time: 47ms
memory: 31444kb

input:

1000 10 4438938768454127105 11400849707395197330

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #82:

score: 8
Acceptable Answer
time: 44ms
memory: 30756kb

input:

1000 10 12809855989060518335 16096479664532822701

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #83:

score: 8
Acceptable Answer
time: 34ms
memory: 30884kb

input:

1000 10 1866324730478452587 12184760107709123044

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #84:

score: 8
Acceptable Answer
time: 34ms
memory: 32000kb

input:

1000 10 3385557446066551060 13320063460899920438

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #85:

score: 8
Acceptable Answer
time: 32ms
memory: 30264kb

input:

1000 10 2771533678859996832 4383486732818647108

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #86:

score: 8
Acceptable Answer
time: 43ms
memory: 32664kb

input:

1000 10 12943117603886392628 4963239483087442233

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #87:

score: 8
Acceptable Answer
time: 38ms
memory: 31284kb

input:

1000 10 2313703064704983170 6736870706983331092

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #88:

score: 8
Acceptable Answer
time: 40ms
memory: 30208kb

input:

1000 10 15804969878376580290 3548856895358739838

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #89:

score: 8
Acceptable Answer
time: 39ms
memory: 30728kb

input:

1000 10 9866080263333804889 8678830744093953826

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #90:

score: 8
Acceptable Answer
time: 32ms
memory: 30780kb

input:

1000 10 6751820871136111185 8848658341608259639

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #91:

score: 8
Acceptable Answer
time: 35ms
memory: 31500kb

input:

1000 10 11486054074739288989 2900919302828998560

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #92:

score: 8
Acceptable Answer
time: 40ms
memory: 31384kb

input:

1000 10 13832119382569826953 13634361971260976354

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #93:

score: 8
Acceptable Answer
time: 40ms
memory: 32664kb

input:

1000 10 4453410960153043101 13357409826523686900

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #94:

score: 8
Acceptable Answer
time: 36ms
memory: 31024kb

input:

1000 10 6074878447994378931 9512185237100875326

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #95:

score: 8
Acceptable Answer
time: 37ms
memory: 31448kb

input:

1000 10 12898383854853911815 17140959228886157821

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #96:

score: 8
Acceptable Answer
time: 44ms
memory: 31460kb

input:

1000 10 17877803113382829335 6155994847379122253

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #97:

score: 8
Acceptable Answer
time: 38ms
memory: 31304kb

input:

1000 10 5411127225557059691 8968502810098781048

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #98:

score: 8
Acceptable Answer
time: 35ms
memory: 32160kb

input:

1000 10 12839765246681509765 16133659220449519045

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #99:

score: 8
Acceptable Answer
time: 36ms
memory: 30956kb

input:

1000 10 10512080521412884683 4322091697636775176

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #100:

score: 8
Acceptable Answer
time: 39ms
memory: 31400kb

input:

1000 10 14839041853446568063 2900577407895090280

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #101:

score: 8
Acceptable Answer
time: 49ms
memory: 31340kb

input:

1000 10 555864648019475755 10623903714134539336

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #102:

score: 8
Acceptable Answer
time: 45ms
memory: 32384kb

input:

1000 10 15351408694997586068 13018688820428928134

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #103:

score: 8
Acceptable Answer
time: 37ms
memory: 30088kb

input:

1000 10 13781134732629544842 649106695383463671

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #104:

score: 8
Acceptable Answer
time: 45ms
memory: 31996kb

input:

1000 10 13103921156463006132 6008463984240882840

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #105:

score: 8
Acceptable Answer
time: 44ms
memory: 31212kb

input:

1000 10 13570315480591854059 16031003972511128594

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #106:

score: 8
Acceptable Answer
time: 36ms
memory: 31012kb

input:

1000 10 939728067048422960 6572615564422233011

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #107:

score: 8
Acceptable Answer
time: 34ms
memory: 31616kb

input:

1000 10 9730657778308128806 10818528495534558245

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #108:

score: 8
Acceptable Answer
time: 32ms
memory: 32712kb

input:

1000 10 14993828721272206953 16844668633587754736

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Subtask #4:

score: 0
Wrong Answer

Test #109:

score: 0
Wrong Answer
time: 34ms
memory: 30792kb

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: 5916kb

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: 1ms
memory: 6088kb

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: 36ms
memory: 19748kb

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: 67ms
memory: 31180kb

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: 178ms
memory: 42208kb

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: 324ms
memory: 56236kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0