QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#523025#8221. 多方计算AdamGS#8 391ms54732kbC++231.3kb2024-08-17 18:49:212024-08-17 18:49:22

Judging History

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

  • [2024-08-17 18:49:22]
  • 评测
  • 测评结果:8
  • 用时:391ms
  • 内存:54732kb
  • [2024-08-17 18:49:21]
  • 提交

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 = 7; // 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: 5936kb

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #2:

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

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

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #38:

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

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #39:

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

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #40:

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

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: 33ms
memory: 31708kb

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: 32ms
memory: 30400kb

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

input:

10 1000 18326939717248212778 15447461170187547045

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #7:

score: 8
Acceptable Answer

Test #217:

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

input:

500 1000 3911210051670624968 2787181900148297327

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #218:

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

input:

500 1000 12450618735493522488 12992043229059408722

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #219:

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

input:

500 1000 11069062474421512571 11771283736385225888

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #220:

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

input:

500 1000 12030437727196687278 3635786373293977777

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #221:

score: 8
Acceptable Answer
time: 28ms
memory: 18696kb

input:

500 1000 3872073101711344974 12208640324328621987

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #222:

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

input:

500 1000 7859510094425854878 16343987436452853527

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #223:

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

input:

500 1000 10288842718408246821 14456646535715260536

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #224:

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

input:

500 1000 18330187155668089188 15210445359162021609

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #225:

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

input:

500 1000 2005856457032504585 99844445693740441

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #226:

score: 8
Acceptable Answer
time: 28ms
memory: 18752kb

input:

500 1000 9453714621680340400 15495898881721491999

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #227:

score: 8
Acceptable Answer
time: 29ms
memory: 18608kb

input:

500 1000 12075794770378620661 4976284918621589981

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #228:

score: 8
Acceptable Answer
time: 30ms
memory: 20104kb

input:

500 1000 6308492247099916527 3369560637860859763

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #229:

score: 8
Acceptable Answer
time: 29ms
memory: 19596kb

input:

500 1000 9284688836681251024 2426654752001937636

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #230:

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

input:

500 1000 8040140754015568076 7491809528243903280

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #231:

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

input:

500 1000 1853435739113625284 14515505623107861412

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #232:

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

input:

500 1000 3574765122048236070 7219245209003197351

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #233:

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

input:

500 1000 4142072214507982385 16054985080853226713

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #234:

score: 8
Acceptable Answer
time: 28ms
memory: 18940kb

input:

500 1000 5595311565343228255 13845596039634954391

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #235:

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

input:

500 1000 15769700446173674061 8921313218967163165

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #236:

score: 8
Acceptable Answer
time: 30ms
memory: 20052kb

input:

500 1000 14308969058837646126 9989146294081471953

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #237:

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

input:

500 1000 4344525014260164171 13328115656897753308

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #238:

score: 8
Acceptable Answer
time: 29ms
memory: 19952kb

input:

500 1000 9502858057401844356 7517482290172991629

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #239:

score: 8
Acceptable Answer
time: 24ms
memory: 19308kb

input:

500 1000 14329203628029783645 6994838492031596982

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #240:

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

input:

500 1000 6584107806636516433 1734266347006898163

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #241:

score: 8
Acceptable Answer
time: 25ms
memory: 19264kb

input:

500 1000 4730445570079162214 11200582368057666991

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #242:

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

input:

500 1000 12131791478889318147 90425344672593305

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #243:

score: 8
Acceptable Answer
time: 29ms
memory: 20760kb

input:

500 1000 15280519285615726848 3966718955736385323

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #244:

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

input:

500 1000 13536864083748980255 7512705063977657212

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #245:

score: 8
Acceptable Answer
time: 29ms
memory: 19628kb

input:

500 1000 2866529125325015539 4988250649359578060

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #246:

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

input:

500 1000 8356632996470471082 1955281105770819807

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #247:

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

input:

500 1000 5427148432621165391 1616532906209105227

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #248:

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

input:

500 1000 7574907226142235517 7938509812046736092

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #249:

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

input:

500 1000 12608804017168928181 12280392327171061624

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #250:

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

input:

500 1000 3909115960984201676 14623615881690352862

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #251:

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

input:

500 1000 11445898621212588459 14853333744180787627

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #252:

score: 8
Acceptable Answer
time: 25ms
memory: 18700kb

input:

500 1000 18028780493452970759 10607315082558949410

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Subtask #8:

score: 0
Wrong Answer

Test #253:

score: 0
Wrong Answer
time: 70ms
memory: 30928kb

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: 186ms
memory: 42412kb

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: 391ms
memory: 54732kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0