QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#523028#8221. 多方计算AdamGS#8 314ms56444kbC++231.3kb2024-08-17 18:50:052024-08-17 18:50:05

Judging History

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

  • [2024-08-17 18:50:05]
  • 评测
  • 测评结果:8
  • 用时:314ms
  • 内存:56444kb
  • [2024-08-17 18:50:05]
  • 提交

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

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #2:

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

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

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #38:

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

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #39:

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

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #40:

score: 0
Wrong Answer
time: 36ms
memory: 30744kb

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

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: 38ms
memory: 31532kb

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

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

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: 85ms
memory: 30816kb

input:

1000 1000 2442055921391744378 15448328346037637846

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #9:

score: 8
Acceptable Answer

Test #289:

score: 8
Acceptable Answer
time: 162ms
memory: 43968kb

input:

1500 1500 8660688640427922501 1436138393991664715

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #290:

score: 8
Acceptable Answer
time: 175ms
memory: 43820kb

input:

1500 1500 15821468721449590935 1370287063033011416

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #291:

score: 8
Acceptable Answer
time: 176ms
memory: 44984kb

input:

1500 1500 14905706279197760556 7979115894370748835

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #292:

score: 8
Acceptable Answer
time: 169ms
memory: 43520kb

input:

1500 1500 11860131552596764958 8017709035069681480

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #293:

score: 8
Acceptable Answer
time: 181ms
memory: 43624kb

input:

1500 1500 10793002976111806344 1778012833479234478

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #294:

score: 8
Acceptable Answer
time: 214ms
memory: 42220kb

input:

1500 1500 3707613830849207178 3823567109353227705

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #295:

score: 8
Acceptable Answer
time: 178ms
memory: 45012kb

input:

1500 1500 10730093168415972859 7485726458233694992

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #296:

score: 8
Acceptable Answer
time: 182ms
memory: 45076kb

input:

1500 1500 6276427342590429778 9830851135031111913

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #297:

score: 8
Acceptable Answer
time: 188ms
memory: 43888kb

input:

1500 1500 771222033145985497 10716000098431620324

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #298:

score: 8
Acceptable Answer
time: 219ms
memory: 43360kb

input:

1500 1500 9271750811903874347 5160963686763585605

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #299:

score: 8
Acceptable Answer
time: 184ms
memory: 44884kb

input:

1500 1500 3225209063906372074 884135422167039708

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #300:

score: 8
Acceptable Answer
time: 179ms
memory: 43820kb

input:

1500 1500 5707316362166515346 2578185571291578563

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #301:

score: 8
Acceptable Answer
time: 170ms
memory: 43192kb

input:

1500 1500 17233452110933630216 8060107981077390919

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #302:

score: 8
Acceptable Answer
time: 186ms
memory: 44992kb

input:

1500 1500 14565239542992731525 5596010651879611568

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #303:

score: 8
Acceptable Answer
time: 199ms
memory: 44680kb

input:

1500 1500 5604298819926611114 9696081885063088986

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #304:

score: 8
Acceptable Answer
time: 173ms
memory: 43140kb

input:

1500 1500 14816690579422088506 15894404033860661698

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #305:

score: 8
Acceptable Answer
time: 196ms
memory: 42524kb

input:

1500 1500 1713586704845356759 13973294383996739260

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #306:

score: 8
Acceptable Answer
time: 178ms
memory: 43496kb

input:

1500 1500 14522131654132439180 12482005957955696483

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #307:

score: 8
Acceptable Answer
time: 182ms
memory: 42716kb

input:

1500 1500 8667561996852633412 9117073091992559102

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #308:

score: 8
Acceptable Answer
time: 165ms
memory: 42368kb

input:

1500 1500 4938206616089681458 2344888672117789236

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #309:

score: 8
Acceptable Answer
time: 192ms
memory: 44784kb

input:

1500 1500 5417078627712096891 3387986847099133636

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #310:

score: 8
Acceptable Answer
time: 212ms
memory: 43936kb

input:

1500 1500 15279190808935773554 17386259390919781373

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #311:

score: 8
Acceptable Answer
time: 170ms
memory: 44832kb

input:

1500 1500 4660736882821437836 3057358251661448099

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #312:

score: 8
Acceptable Answer
time: 179ms
memory: 42412kb

input:

1500 1500 12977115211852243655 2990540416920348059

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #313:

score: 8
Acceptable Answer
time: 178ms
memory: 42500kb

input:

1500 1500 6872887052776151935 15524917341052561325

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #314:

score: 8
Acceptable Answer
time: 189ms
memory: 43588kb

input:

1500 1500 7929402025520068977 13863078002579700637

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #315:

score: 8
Acceptable Answer
time: 166ms
memory: 44912kb

input:

1500 1500 15505613483719086736 4176670369734052175

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #316:

score: 8
Acceptable Answer
time: 174ms
memory: 43960kb

input:

1500 1500 6934614962913797986 18094516775993075355

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #317:

score: 8
Acceptable Answer
time: 169ms
memory: 42144kb

input:

1500 1500 7106802515016554329 4184843161005717373

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #318:

score: 8
Acceptable Answer
time: 229ms
memory: 42392kb

input:

1500 1500 11868153384668129069 16717020189753503951

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #319:

score: 8
Acceptable Answer
time: 192ms
memory: 43728kb

input:

1500 1500 3940247893216235832 2561453070110778764

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #320:

score: 8
Acceptable Answer
time: 242ms
memory: 44592kb

input:

1500 1500 839345024594186050 11901568297122919168

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #321:

score: 8
Acceptable Answer
time: 190ms
memory: 44172kb

input:

1500 1500 4835519574303509069 10870739891590851490

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #322:

score: 8
Acceptable Answer
time: 178ms
memory: 43932kb

input:

1500 1500 4306278969622507976 11603410447576150585

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #323:

score: 8
Acceptable Answer
time: 202ms
memory: 43072kb

input:

1500 1500 3988177172094663035 1003704229834891695

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #324:

score: 8
Acceptable Answer
time: 210ms
memory: 42220kb

input:

1500 1500 8985317573333576845 14201170872917056420

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Subtask #10:

score: 0
Wrong Answer

Test #325:

score: 0
Wrong Answer
time: 314ms
memory: 56444kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187648

result:

points 0.0 Correct Answer. 0