QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#523052 | #8221. 多方计算 | AdamGS# | 8 | 353ms | 57172kb | C++23 | 1.3kb | 2024-08-17 19:00:36 | 2024-08-17 19:00:37 |
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+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 = 4; // do zmiany
int n=N[subtask];
int m=M[subtask];
int K=11;
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;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 8
Acceptable Answer
time: 1ms
memory: 6024kb
input:
5 5 3185997250635081508 10243950506680270049
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 6028kb
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: 52ms
memory: 31296kb
input:
1000 1 17833636513278974999 18032835279213373306
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #38:
score: 8
Acceptable Answer
time: 35ms
memory: 32528kb
input:
1000 1 14730911653810224758 12266600726496100996
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #39:
score: 8
Acceptable Answer
time: 36ms
memory: 31716kb
input:
1000 1 8799733959292548924 5387063902427699037
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #40:
score: 0
Wrong Answer
time: 36ms
memory: 31656kb
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: 36ms
memory: 32552kb
input:
1000 10 7581650225429700886 16046788410942473709
output:
4123764187648
result:
points 0.0 Correct Answer. 0
Subtask #4:
score: 8
Acceptable Answer
Test #109:
score: 8
Acceptable Answer
time: 33ms
memory: 31952kb
input:
1000 30 15510757929061591914 2629686482095382587
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #110:
score: 8
Acceptable Answer
time: 42ms
memory: 31836kb
input:
1000 30 12801036214420587075 2037510991448894723
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #111:
score: 8
Acceptable Answer
time: 45ms
memory: 31176kb
input:
1000 30 7278229868553719282 3031492496837408805
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #112:
score: 8
Acceptable Answer
time: 32ms
memory: 32376kb
input:
1000 30 5023044253913195306 10430362173020596870
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #113:
score: 8
Acceptable Answer
time: 43ms
memory: 32208kb
input:
1000 30 14375927177340504141 12571864925174024193
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #114:
score: 8
Acceptable Answer
time: 37ms
memory: 31620kb
input:
1000 30 6670727120156260286 15892206295475225514
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #115:
score: 8
Acceptable Answer
time: 36ms
memory: 30328kb
input:
1000 30 18286184159808909528 13065670740492976498
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #116:
score: 8
Acceptable Answer
time: 37ms
memory: 30296kb
input:
1000 30 3954788336215976339 7442831602180175236
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #117:
score: 8
Acceptable Answer
time: 41ms
memory: 32664kb
input:
1000 30 10952440412821131470 11349869625262155151
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #118:
score: 8
Acceptable Answer
time: 38ms
memory: 31292kb
input:
1000 30 4085102339188936571 15739592000796325584
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #119:
score: 8
Acceptable Answer
time: 48ms
memory: 30080kb
input:
1000 30 7706773163318195890 3352145088310669388
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #120:
score: 8
Acceptable Answer
time: 34ms
memory: 32056kb
input:
1000 30 13777535526390279015 797289958402503269
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #121:
score: 8
Acceptable Answer
time: 41ms
memory: 32296kb
input:
1000 30 8556325522564209758 17955966250807680816
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #122:
score: 8
Acceptable Answer
time: 33ms
memory: 31664kb
input:
1000 30 7363924610757141722 7852137169585416368
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #123:
score: 8
Acceptable Answer
time: 32ms
memory: 31420kb
input:
1000 30 10163937283778807635 11035337627209972542
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #124:
score: 8
Acceptable Answer
time: 41ms
memory: 32548kb
input:
1000 30 15419757916046227848 4668909061116779908
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #125:
score: 8
Acceptable Answer
time: 35ms
memory: 32948kb
input:
1000 30 672618169337249405 10664328148817883435
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #126:
score: 8
Acceptable Answer
time: 37ms
memory: 31984kb
input:
1000 30 5063121585155974658 6755615366902454195
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #127:
score: 8
Acceptable Answer
time: 41ms
memory: 32084kb
input:
1000 30 8558163706368102019 16841941454688543796
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #128:
score: 8
Acceptable Answer
time: 43ms
memory: 31188kb
input:
1000 30 11662060158847358808 4797190117440167877
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #129:
score: 8
Acceptable Answer
time: 47ms
memory: 31132kb
input:
1000 30 9073706970143758020 1582240709035328983
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #130:
score: 8
Acceptable Answer
time: 37ms
memory: 32608kb
input:
1000 30 8186759472286953608 11105424148319609938
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #131:
score: 8
Acceptable Answer
time: 37ms
memory: 31008kb
input:
1000 30 5847334012130682053 13320276639945825069
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #132:
score: 8
Acceptable Answer
time: 35ms
memory: 30468kb
input:
1000 30 7443440158558308795 6887347845812589564
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #133:
score: 8
Acceptable Answer
time: 37ms
memory: 31048kb
input:
1000 30 11305528358454252914 8295362506428551928
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #134:
score: 8
Acceptable Answer
time: 33ms
memory: 32880kb
input:
1000 30 7384288505844391014 7960204400404678053
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #135:
score: 8
Acceptable Answer
time: 34ms
memory: 31808kb
input:
1000 30 10321224009109632439 7081446363439574641
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #136:
score: 8
Acceptable Answer
time: 49ms
memory: 32036kb
input:
1000 30 10471826671587974423 78480078006165212
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #137:
score: 8
Acceptable Answer
time: 40ms
memory: 32396kb
input:
1000 30 16213211651888696440 8866465228901066804
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #138:
score: 8
Acceptable Answer
time: 36ms
memory: 32048kb
input:
1000 30 8236660749725225398 3545587591468540112
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #139:
score: 8
Acceptable Answer
time: 37ms
memory: 32452kb
input:
1000 30 6607466518388369970 797081879253700015
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #140:
score: 8
Acceptable Answer
time: 40ms
memory: 31748kb
input:
1000 30 4813863740767819220 2202452198245940946
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #141:
score: 8
Acceptable Answer
time: 36ms
memory: 31440kb
input:
1000 30 14559715038138208529 1495126237086538372
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #142:
score: 8
Acceptable Answer
time: 33ms
memory: 31280kb
input:
1000 30 2994652599112894046 17803480398762623920
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #143:
score: 8
Acceptable Answer
time: 40ms
memory: 31464kb
input:
1000 30 3586231851761129647 13277925850312293378
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #144:
score: 8
Acceptable Answer
time: 36ms
memory: 31120kb
input:
1000 30 6336578536886788319 2675249028071512010
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Subtask #5:
score: 0
Wrong Answer
Test #145:
score: 0
Wrong Answer
time: 1ms
memory: 5956kb
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: 6020kb
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: 36ms
memory: 19556kb
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: 71ms
memory: 31988kb
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: 161ms
memory: 43332kb
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: 353ms
memory: 57172kb
input:
2000 2000 6596342253746377097 6195418207254921855
output:
4123764187648
result:
points 0.0 Correct Answer. 0