QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#523027#8221. 多方计算AdamGS#8 371ms56024kbC++231.3kb2024-08-17 18:49:402024-08-17 18:49:40

Judging History

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

  • [2024-08-17 18:49:40]
  • 评测
  • 测评结果:8
  • 用时:371ms
  • 内存:56024kb
  • [2024-08-17 18:49:40]
  • 提交

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 = 8; // 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: 8
Acceptable Answer
time: 1ms
memory: 6252kb

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #2:

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

input:

5 5 3552483843587513799 14478819593833617714

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #2:

score: 0
Wrong Answer

Test #37:

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

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #38:

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

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #39:

score: 8
Acceptable Answer
time: 41ms
memory: 31236kb

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #40:

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

input:

1000 1 9630334707439747607 4291049102998855878

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #3:

score: 0
Wrong Answer

Test #73:

score: 0
Wrong Answer
time: 38ms
memory: 31024kb

input:

1000 10 7581650225429700886 16046788410942473709

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #4:

score: 0
Wrong Answer

Test #109:

score: 0
Wrong Answer
time: 30ms
memory: 31772kb

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

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

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: 37ms
memory: 18248kb

input:

500 1000 3911210051670624968 2787181900148297327

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #8:

score: 8
Acceptable Answer

Test #253:

score: 8
Acceptable Answer
time: 75ms
memory: 32108kb

input:

1000 1000 2442055921391744378 15448328346037637846

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #254:

score: 8
Acceptable Answer
time: 90ms
memory: 31644kb

input:

1000 1000 16647476705341035385 17846374371867977517

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #255:

score: 8
Acceptable Answer
time: 113ms
memory: 30912kb

input:

1000 1000 15269935845657062594 3733483100427089893

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #256:

score: 8
Acceptable Answer
time: 83ms
memory: 31420kb

input:

1000 1000 7827255001840617549 14765536290277618109

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #257:

score: 8
Acceptable Answer
time: 78ms
memory: 32332kb

input:

1000 1000 13701238499442576365 17227534761439395182

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #258:

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

input:

1000 1000 14150694437641300095 7012253273483526176

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #259:

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

input:

1000 1000 3209009366144994095 1260289214875388784

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #260:

score: 8
Acceptable Answer
time: 77ms
memory: 31184kb

input:

1000 1000 9276259532615321589 16054182787553268415

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #261:

score: 8
Acceptable Answer
time: 84ms
memory: 31360kb

input:

1000 1000 2376470501919743219 8454901431202341881

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #262:

score: 8
Acceptable Answer
time: 68ms
memory: 30936kb

input:

1000 1000 8124003251140810684 17046112885743347876

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #263:

score: 8
Acceptable Answer
time: 78ms
memory: 31520kb

input:

1000 1000 498046130035995054 9343896178609470666

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #264:

score: 8
Acceptable Answer
time: 88ms
memory: 31888kb

input:

1000 1000 8232123788512164157 5380600461990799855

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #265:

score: 8
Acceptable Answer
time: 113ms
memory: 30644kb

input:

1000 1000 17343086271442564004 17267253247072528546

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #266:

score: 8
Acceptable Answer
time: 86ms
memory: 31268kb

input:

1000 1000 658571136895258792 1296511738645579222

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #267:

score: 8
Acceptable Answer
time: 91ms
memory: 30832kb

input:

1000 1000 15280558666146147829 17361773959325783669

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #268:

score: 8
Acceptable Answer
time: 87ms
memory: 30876kb

input:

1000 1000 16055592008216797890 12702482638735076729

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #269:

score: 8
Acceptable Answer
time: 73ms
memory: 31036kb

input:

1000 1000 11844570679478259607 2259274649863893446

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #270:

score: 8
Acceptable Answer
time: 97ms
memory: 32272kb

input:

1000 1000 13281855318000524085 12976753030014592542

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #271:

score: 8
Acceptable Answer
time: 86ms
memory: 31424kb

input:

1000 1000 112965995807418418 5285593098042419225

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #272:

score: 8
Acceptable Answer
time: 117ms
memory: 31264kb

input:

1000 1000 18428364413671739105 7824896363716141341

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #273:

score: 8
Acceptable Answer
time: 97ms
memory: 31276kb

input:

1000 1000 4736043027026703934 18134536854010678826

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #274:

score: 8
Acceptable Answer
time: 87ms
memory: 32216kb

input:

1000 1000 6801818849976207195 71142770362301839

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #275:

score: 8
Acceptable Answer
time: 79ms
memory: 30880kb

input:

1000 1000 13049919169450950307 16349987534598898746

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #276:

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

input:

1000 1000 12024034565628036956 16160528376115834715

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #277:

score: 8
Acceptable Answer
time: 77ms
memory: 30368kb

input:

1000 1000 9380446667117198505 16132169379590613549

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #278:

score: 8
Acceptable Answer
time: 88ms
memory: 32544kb

input:

1000 1000 8571066516910635762 79579533323815931

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #279:

score: 8
Acceptable Answer
time: 74ms
memory: 30740kb

input:

1000 1000 8194775572854868253 4531404443373941922

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #280:

score: 8
Acceptable Answer
time: 78ms
memory: 31108kb

input:

1000 1000 14010869570619320332 8495323777974553283

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #281:

score: 8
Acceptable Answer
time: 86ms
memory: 31712kb

input:

1000 1000 12369822767539763512 11944264880251376849

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #282:

score: 8
Acceptable Answer
time: 116ms
memory: 31788kb

input:

1000 1000 7036199069635679534 4587745873040737924

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #283:

score: 8
Acceptable Answer
time: 86ms
memory: 31848kb

input:

1000 1000 15547761817816490088 5852030270042037434

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #284:

score: 8
Acceptable Answer
time: 83ms
memory: 31908kb

input:

1000 1000 2323101367847953902 14133496205473203601

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #285:

score: 8
Acceptable Answer
time: 76ms
memory: 31260kb

input:

1000 1000 13888293757058422846 15460976391506261936

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #286:

score: 8
Acceptable Answer
time: 82ms
memory: 32924kb

input:

1000 1000 12566227964038476467 13432185697942495632

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #287:

score: 8
Acceptable Answer
time: 74ms
memory: 31828kb

input:

1000 1000 10775094794255711589 16788170504560580934

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #288:

score: 8
Acceptable Answer
time: 82ms
memory: 31648kb

input:

1000 1000 10071661744346988709 5598264466611788374

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Subtask #9:

score: 0
Wrong Answer

Test #289:

score: 0
Wrong Answer
time: 174ms
memory: 43780kb

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: 371ms
memory: 56024kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0