QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#523044 | #8221. 多方计算 | AdamGS# | 0 | 364ms | 57572kb | C++23 | 1.3kb | 2024-08-17 18:57:23 | 2024-08-17 18:57:24 |
Judging History
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){
/*int x=n+m, p=1;
while(p<n) {
p*=2;
++x;
}
return x+1;*/
return n+m+3;
}
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 = 4; // do zmiany
int n=N[subtask];
int m=M[subtask];
int K=6;
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>=K && m-1-(position-K-1)+(round-2)>=0) {
dodaj(player, m-1-(position-K-1)+(round-2), player.last_message);
}
if(position>=K && m-1-(position-K)+(round-1)>=0) {
bool p=player.memory[m-1-(position-K)+(round-1)];
if(position!=n) player.memory[m-1-(position-K)+(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: 10
Accepted
time: 1ms
memory: 6188kb
input:
5 5 3185997250635081508 10243950506680270049
output:
4123764187658
result:
ok Perfect. 10
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 5880kb
input:
5 5 3552483843587513799 14478819593833617714
output:
4123764187648
result:
points 0.0 Correct Answer. 0
Subtask #2:
score: 0
Wrong Answer
Test #37:
score: 10
Accepted
time: 38ms
memory: 31464kb
input:
1000 1 17833636513278974999 18032835279213373306
output:
4123764187658
result:
ok Perfect. 10
Test #38:
score: 10
Accepted
time: 34ms
memory: 31260kb
input:
1000 1 14730911653810224758 12266600726496100996
output:
4123764187658
result:
ok Perfect. 10
Test #39:
score: 10
Accepted
time: 32ms
memory: 31512kb
input:
1000 1 8799733959292548924 5387063902427699037
output:
4123764187658
result:
ok Perfect. 10
Test #40:
score: 0
Wrong Answer
time: 33ms
memory: 31880kb
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: 32452kb
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: 31ms
memory: 32516kb
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: 6264kb
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: 0ms
memory: 6044kb
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: 34ms
memory: 20092kb
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: 61ms
memory: 30160kb
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: 160ms
memory: 44036kb
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: 364ms
memory: 57572kb
input:
2000 2000 6596342253746377097 6195418207254921855
output:
4123764187648
result:
points 0.0 Correct Answer. 0