QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#523024 | #8221. 多方计算 | AdamGS# | 8 | 402ms | 54256kb | C++23 | 1.3kb | 2024-08-17 18:49:01 | 2024-08-17 18:49:02 |
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){
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 = 6; // 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;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 8
Acceptable Answer
time: 1ms
memory: 6220kb
input:
5 5 3185997250635081508 10243950506680270049
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 5936kb
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: 41ms
memory: 31628kb
input:
1000 1 17833636513278974999 18032835279213373306
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #38:
score: 8
Acceptable Answer
time: 40ms
memory: 31432kb
input:
1000 1 14730911653810224758 12266600726496100996
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #39:
score: 8
Acceptable Answer
time: 39ms
memory: 31804kb
input:
1000 1 8799733959292548924 5387063902427699037
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #40:
score: 0
Wrong Answer
time: 34ms
memory: 32796kb
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: 43ms
memory: 30996kb
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: 37ms
memory: 31508kb
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: 5848kb
input:
3 1000 341353812123787886 3685575517089631424
output:
4123764187648
result:
points 0.0 Correct Answer. 0
Subtask #6:
score: 8
Acceptable Answer
Test #181:
score: 8
Acceptable Answer
time: 1ms
memory: 6016kb
input:
10 1000 18326939717248212778 15447461170187547045
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #182:
score: 8
Acceptable Answer
time: 1ms
memory: 6304kb
input:
10 1000 14303031343316484183 9472080590628751829
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #183:
score: 8
Acceptable Answer
time: 0ms
memory: 6024kb
input:
10 1000 6233199299539916020 10372969863434063623
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #184:
score: 8
Acceptable Answer
time: 2ms
memory: 8056kb
input:
10 1000 1320605970495772867 4274588898210052251
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #185:
score: 8
Acceptable Answer
time: 1ms
memory: 6012kb
input:
10 1000 14667738752363126712 15543214327211267039
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #186:
score: 8
Acceptable Answer
time: 1ms
memory: 6020kb
input:
10 1000 10274293415244696041 17671200215417759696
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #187:
score: 8
Acceptable Answer
time: 1ms
memory: 6092kb
input:
10 1000 4129898547535974940 2097260917301158188
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #188:
score: 8
Acceptable Answer
time: 1ms
memory: 6092kb
input:
10 1000 18342269208029532093 15215718152940184965
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #189:
score: 8
Acceptable Answer
time: 1ms
memory: 6108kb
input:
10 1000 16324449487311799561 7257057435731061212
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #190:
score: 8
Acceptable Answer
time: 1ms
memory: 6028kb
input:
10 1000 10598547070254751569 6031892680829982589
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #191:
score: 8
Acceptable Answer
time: 0ms
memory: 6020kb
input:
10 1000 13928323168396069327 3069105625135055196
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #192:
score: 8
Acceptable Answer
time: 1ms
memory: 6368kb
input:
10 1000 7599195458077868580 2945826695732953372
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #193:
score: 8
Acceptable Answer
time: 0ms
memory: 6064kb
input:
10 1000 16598363586585449081 1440500051205705477
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #194:
score: 8
Acceptable Answer
time: 0ms
memory: 6016kb
input:
10 1000 16806046847554949461 2043290592937055118
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #195:
score: 8
Acceptable Answer
time: 0ms
memory: 6072kb
input:
10 1000 3412781614737162070 9157890737458129939
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #196:
score: 8
Acceptable Answer
time: 1ms
memory: 6048kb
input:
10 1000 4929995236017118670 8805666030260933868
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #197:
score: 8
Acceptable Answer
time: 1ms
memory: 6004kb
input:
10 1000 7054768874297620754 13274619671851658120
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #198:
score: 8
Acceptable Answer
time: 1ms
memory: 6016kb
input:
10 1000 7528585877073359050 793284693053543078
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #199:
score: 8
Acceptable Answer
time: 0ms
memory: 6272kb
input:
10 1000 12757899563936718782 4849101846511580591
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #200:
score: 8
Acceptable Answer
time: 1ms
memory: 6300kb
input:
10 1000 12042451762321061777 6545871721881053425
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #201:
score: 8
Acceptable Answer
time: 1ms
memory: 6084kb
input:
10 1000 7271935812956957572 10497459529945546802
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #202:
score: 8
Acceptable Answer
time: 1ms
memory: 6020kb
input:
10 1000 6341439274689803684 14246348077672882158
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #203:
score: 8
Acceptable Answer
time: 1ms
memory: 6300kb
input:
10 1000 3817682523043446725 5494962900415238875
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #204:
score: 8
Acceptable Answer
time: 1ms
memory: 6316kb
input:
10 1000 8416959987199109088 17055829519218252994
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #205:
score: 8
Acceptable Answer
time: 1ms
memory: 6304kb
input:
10 1000 1793119264835992157 1714507864697105513
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #206:
score: 8
Acceptable Answer
time: 1ms
memory: 6044kb
input:
10 1000 7724528875454987642 1763061129361823916
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #207:
score: 8
Acceptable Answer
time: 1ms
memory: 6016kb
input:
10 1000 11534422635927781263 4070139928445244316
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #208:
score: 8
Acceptable Answer
time: 1ms
memory: 6068kb
input:
10 1000 15372080430015808791 16089397545846471516
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #209:
score: 8
Acceptable Answer
time: 1ms
memory: 6016kb
input:
10 1000 6236739776451055601 16047865218788497420
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #210:
score: 8
Acceptable Answer
time: 1ms
memory: 6088kb
input:
10 1000 14252413239239367160 1213233746428807014
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #211:
score: 8
Acceptable Answer
time: 1ms
memory: 5968kb
input:
10 1000 18135377716189417455 5631819315037367158
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #212:
score: 8
Acceptable Answer
time: 1ms
memory: 6272kb
input:
10 1000 975559190469584474 827633655855054297
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #213:
score: 8
Acceptable Answer
time: 1ms
memory: 6236kb
input:
10 1000 1747065086398515576 5843112412157263265
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #214:
score: 8
Acceptable Answer
time: 1ms
memory: 6012kb
input:
10 1000 10928581559530131120 11165431097660462799
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #215:
score: 8
Acceptable Answer
time: 1ms
memory: 6012kb
input:
10 1000 5295255670083867030 1534392144514066093
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Test #216:
score: 8
Acceptable Answer
time: 1ms
memory: 6012kb
input:
10 1000 9073389650834195843 13245215630127115996
output:
4123764187656
result:
points 0.80 Correct Answer. 8
Subtask #7:
score: 0
Wrong Answer
Test #217:
score: 0
Wrong Answer
time: 30ms
memory: 19216kb
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: 68ms
memory: 31020kb
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: 166ms
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: 402ms
memory: 54256kb
input:
2000 2000 6596342253746377097 6195418207254921855
output:
4123764187648
result:
points 0.0 Correct Answer. 0