QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#523023#8221. 多方计算AdamGS#8 406ms55844kbC++231.3kb2024-08-17 18:48:362024-08-17 18:48:37

Judging History

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

  • [2024-08-17 18:48:37]
  • 评测
  • 测评结果:8
  • 用时:406ms
  • 内存:55844kb
  • [2024-08-17 18:48:36]
  • 提交

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

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #2:

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

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: 42ms
memory: 30944kb

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #38:

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

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #39:

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

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #40:

score: 0
Wrong Answer
time: 42ms
memory: 31216kb

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: 35ms
memory: 31100kb

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: 42ms
memory: 31812kb

input:

1000 30 15510757929061591914 2629686482095382587

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #5:

score: 8
Acceptable Answer

Test #145:

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

input:

3 1000 341353812123787886 3685575517089631424

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #146:

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

input:

3 1000 17554024470069985393 14526118928412869541

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #147:

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

input:

3 1000 11100872062048687810 2436800177126848628

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #148:

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

input:

3 1000 12273008098306225590 16096411110101172825

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #149:

score: 8
Acceptable Answer
time: 0ms
memory: 5852kb

input:

3 1000 5654804106297455579 15032882241153944630

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #150:

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

input:

3 1000 11657166324406481549 9353824690667677565

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #151:

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

input:

3 1000 9856996265363358370 1303189576722459924

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #152:

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

input:

3 1000 13762958351315737777 17656605426995507653

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #153:

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

input:

3 1000 6594820974237499008 8275191558646832971

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #154:

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

input:

3 1000 15364608258723563115 6775374271333152271

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #155:

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

input:

3 1000 8632788633816311118 11344661582645288445

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #156:

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

input:

3 1000 3761871134959282714 6665092712492706442

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #157:

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

input:

3 1000 7094498594234606872 8910549019427251768

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #158:

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

input:

3 1000 3150940857228445655 13881058163925087748

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #159:

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

input:

3 1000 4138134701063904295 1719971509658971853

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #160:

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

input:

3 1000 5958659699359151667 2414251605389031835

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #161:

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

input:

3 1000 5944678764869264249 12798935463560265075

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #162:

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

input:

3 1000 4284102408051741763 14814507977658888488

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #163:

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

input:

3 1000 68627333965422180 112502394402464737

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #164:

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

input:

3 1000 9425733985639080184 7223503398227154738

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #165:

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

input:

3 1000 8943577954292636643 17050920714073219153

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #166:

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

input:

3 1000 11496811535444871688 17614364677931546223

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #167:

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

input:

3 1000 11326082696967067008 15441004054432712190

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #168:

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

input:

3 1000 674874697473693630 12649997796392211087

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #169:

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

input:

3 1000 1277251190199972050 14038814491796751538

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #170:

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

input:

3 1000 9145151749445284299 14293688652236038951

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #171:

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

input:

3 1000 15904416939287794082 14428505338208190980

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #172:

score: 8
Acceptable Answer
time: 0ms
memory: 5956kb

input:

3 1000 6941291132256775130 12849312109895089494

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #173:

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

input:

3 1000 17548422519337327843 202236826264518662

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #174:

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

input:

3 1000 17860234706011656272 8403215217493848355

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #175:

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

input:

3 1000 13237681186403336364 1756180179264870639

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #176:

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

input:

3 1000 10003937773928046600 7429936390634919158

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #177:

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

input:

3 1000 14525148579459393729 1812692019584178560

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #178:

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

input:

3 1000 9397110039933932416 8176227936526769663

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #179:

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

input:

3 1000 5937527883284015772 13220661886981109044

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #180:

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

input:

3 1000 16390577403064012729 17586432346005845474

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Subtask #6:

score: 0
Wrong Answer

Test #181:

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

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

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: 75ms
memory: 32616kb

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: 180ms
memory: 44792kb

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: 406ms
memory: 55844kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0