QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#523029#8221. 多方计算AdamGS#0 401ms57668kbC++231.3kb2024-08-17 18:50:292024-08-17 18:50:29

Judging History

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

  • [2024-08-17 18:50:29]
  • 评测
  • 测评结果:0
  • 用时:401ms
  • 内存:57668kb
  • [2024-08-17 18:50:29]
  • 提交

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

input:

5 5 3185997250635081508 10243950506680270049

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #2:

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

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

input:

1000 1 17833636513278974999 18032835279213373306

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #38:

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

input:

1000 1 14730911653810224758 12266600726496100996

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #39:

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

input:

1000 1 8799733959292548924 5387063902427699037

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #40:

score: 0
Wrong Answer
time: 65ms
memory: 31364kb

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

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: 39ms
memory: 31592kb

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

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

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: 91ms
memory: 32592kb

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: 196ms
memory: 43352kb

input:

1500 1500 8660688640427922501 1436138393991664715

output:

4123764187648

result:

points 0.0 Correct Answer. 0

Subtask #10:

score: 0
Time Limit Exceeded

Test #325:

score: 8
Acceptable Answer
time: 350ms
memory: 56192kb

input:

2000 2000 6596342253746377097 6195418207254921855

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #326:

score: 8
Acceptable Answer
time: 324ms
memory: 56248kb

input:

2000 2000 9578410915320215977 9798607667370863800

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #327:

score: 8
Acceptable Answer
time: 401ms
memory: 54180kb

input:

2000 2000 1428348465152969447 5509830744497891251

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #328:

score: 8
Acceptable Answer
time: 327ms
memory: 55756kb

input:

2000 2000 2723613418581252108 14036474887546456029

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #329:

score: 8
Acceptable Answer
time: 356ms
memory: 54256kb

input:

2000 2000 6005493680129505896 17128651506661589319

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #330:

score: 8
Acceptable Answer
time: 356ms
memory: 57452kb

input:

2000 2000 15482211388333944502 16497182436509890648

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #331:

score: 8
Acceptable Answer
time: 329ms
memory: 54968kb

input:

2000 2000 17150138237857599334 11354934086966526294

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #332:

score: 8
Acceptable Answer
time: 349ms
memory: 56168kb

input:

2000 2000 14563440037069478728 5294862541365511521

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #333:

score: 8
Acceptable Answer
time: 370ms
memory: 57668kb

input:

2000 2000 8386181302677145400 6315977446943840828

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #334:

score: 8
Acceptable Answer
time: 369ms
memory: 56028kb

input:

2000 2000 3552373659101665962 6888165094720747729

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #335:

score: 8
Acceptable Answer
time: 360ms
memory: 55944kb

input:

2000 2000 7194956278663366501 12666077908035860904

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #336:

score: 8
Acceptable Answer
time: 398ms
memory: 57124kb

input:

2000 2000 13239354503764003546 10582671449561621336

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #337:

score: 8
Acceptable Answer
time: 295ms
memory: 54444kb

input:

2000 2000 9496696710018856863 9561633364955048128

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #338:

score: 8
Acceptable Answer
time: 276ms
memory: 55840kb

input:

2000 2000 7246594424647246123 12469099407620847942

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #339:

score: 8
Acceptable Answer
time: 341ms
memory: 55932kb

input:

2000 2000 6808005433795673581 13998266915664499136

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #340:

score: 8
Acceptable Answer
time: 318ms
memory: 57588kb

input:

2000 2000 12576041754224039878 7855140611629403640

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #341:

score: 8
Acceptable Answer
time: 329ms
memory: 57468kb

input:

2000 2000 10138951565672225022 9527160383930803734

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #342:

score: 8
Acceptable Answer
time: 317ms
memory: 55840kb

input:

2000 2000 15034115921681540301 13120564017898354258

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #343:

score: 8
Acceptable Answer
time: 327ms
memory: 56868kb

input:

2000 2000 285336284015200579 7304967004972457111

output:

4123764187656

result:

points 0.80 Correct Answer. 8

Test #344:

score: 0
Time Limit Exceeded

input:

2000 2000 7755774589845873473 10034376063028114974

output:

4123764187656

result: