QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#73912 | #5447. 鸽子 | Qingyu | 0.01 | 7ms | 4160kb | C++14 | 2.5kb | 2023-01-29 15:28:25 | 2023-01-29 22:51:33 |
Judging History
answer
#include <string>
//you may define some global variables, but it does not work if you try to transfer any information from function pigeon_num or function send to function receive through these variables.
//you had better not use the same global variables in function send and in function receive.
/*
Taskid: The index of the subtask. If it is subtask 2, then Taskid=2.
k: The time threshold. Suppose the i-th pigeon taking off is the p_i-th one to land. It is guaranteed that abs(i-p_i)<=k.
return value: The number of pigeons Little E will use.
*/
int pigeon_num(int Taskid, int k){
//you may do some initialization for SEND function here
return 5;//change this into your code
}
/*
Taskid: The index of the subtask. If it is subtask 2, then Taskid=2.
n: The number of pigeons Little E will use. This equals the return value of function pigeon_num.
k: The time threshold. Suppose the i-th pigeon taking off is the p_i-th one to land. It is guaranteed that abs(i-p_i)<=k.
msg: The content of the message.
return value: The order of the pigeons taking off. The length of this string must be n. return_value[i]='0' means the (i+1)-th pigeon taking off is black. return_value[i]='1' means the (i+1)-th pigeon taking off is white.
*/
std::string send(int Taskid, int n, int k, __uint128_t msg){
return "10101";//change this into your code
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class Init{
public:
Init(){
//you may do some initialization for RECEIVE function here
}
};
/*
Taskid: The index of the subtask. If it is subtask 2, then Taskid=2.
k: The time threshold. Suppose the i-th pigeon taking off is the p_i-th one to land. It is guaranteed that abs(i-p_i)<=k.
msg: The order of the pigeons landing. Its length is equal to n. msg[i] denotes the color of the (i+1)-th pigeon watched landing by Little F. '0' means black and '1' means white.
return value: The content of the message. It should be correct.
*/
__uint128_t receive(int Taskid, int k, const std::string &msg){
const static Init init;
{//change this into your code
__uint128_t hi = 5281683694948011861llu;
__uint128_t lo = 3195384480471073102llu;
return hi<<64|lo; //this value equals 97429867398990605044182047185430790478
}
}
詳細信息
Subtask #1:
score: 0.01
Accepted
Test #1:
score: 0.01
Accepted
time: 6ms = 2ms + 4ms
memory: 3840kb,4160kb
input:
encode 0 6 1 444386057 1259251521813 3478565260041 1380014506318
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 0 6 10000 5 0 21 0 11 0 26 0 21 0 14 0 26 0 21 0 11 0 26 0 13 0 28 0 11 0 19 0 19 0 14 0 26 0 25 0 13 0 25 0 25 0 28 0 14 0 7 0 13 0 19 0 13 0 13 0 11 0 13 0 22 0 22 0 19 0 26 0 22 0 14 0 25 0 26 0 7 0 13 0 26 0 26 0 26 0 19 0 14 0 14 0 28 0 11 0 14 0 13 0 19 0 11 0 22 0 13 0 25 0 22 0 13 0 2...
result:
ok Accepted using 5 pigeon(s).
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 7ms = 3ms + 4ms
memory: 4016kb,4040kb
input:
encode 1 20 1000 429620070 0 0 720 0 0 312 0 0 746 0 0 460 0 0 449 0 0 778 0 0 877 0 0 951 0 0 40 0 0 836 0 0 436 0 0 440 0 0 694 0 0 3 0 0 124 0 0 123 0 0 812 0 0 848 0 0 569 0 0 46 0 0 144 0 0 930 0 0 703 0 0 830 0 0 198 0 0 1023 0 0 291 0 0 804 0 0 356 0 0 122 0 0 77 0 0 162 0 0 337 0 0 461 0 0 3...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 1 20 10000 5 1 28 0 28 0 28 1 28 0 28 1 28 0 28 0 28 1 28 0 28 1 28 0 28 0 28 0 28 0 28 1 28 0 28 1 28 1 28 0 28 0 28 0 28 1 28 1 28 0 28 0 28 1 28 0 28 0 28 0 28 1 28 0 28 0 28 1 28 0 28 1 28 0 28 1 28 0 28 0 28 0 28 0 28 1 28 0 28 0 28 0 28 1 28 0 28 1 28 1 28 1 28 0 28 1 28 1 28 1 28 1 28 ...
result:
wrong answer Received wrong message.
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 6ms = 2ms + 4ms
memory: 4020kb,4044kb
input:
encode 2 1 1000 436825046 0 0 600068 0 0 609400 0 0 1024294 0 0 791018 0 0 906125 0 0 350192 0 0 938169 0 0 978316 0 0 498345 0 0 859442 0 0 990072 0 0 996124 0 0 1013379 0 0 383142 0 0 355230 0 0 636760 0 0 138612 0 0 1014140 0 0 116388 0 0 286851 0 0 689038 0 0 996312 0 0 872409 0 0 137655 0 0 165...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 2 1 10000 5 0 21 0 21 1 21 1 21 0 21 0 21 1 21 0 21 0 21 0 21 0 21 1 21 0 21 0 21 0 21 1 21 0 21 0 21 1 21 1 21 0 21 1 21 0 21 0 21 0 21 1 21 1 21 1 21 0 21 0 21 0 21 1 21 0 21 1 21 1 21 1 21 1 21 1 21 0 21 0 21 0 21 1 21 1 21 0 21 0 21 1 21 0 21 1 21 0 21 0 21 1 21 0 21 0 21 1 21 1 21 0 21 1...
result:
wrong answer Received wrong message.
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 5ms = 2ms + 3ms
memory: 3920kb,3916kb
input:
encode 3 1 1000 387247419 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0 ...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 3 1 10000 5 0 21 1 21 1 21 0 21 1 21 1 21 1 21 0 21 1 21 0 21 0 21 0 21 1 21 0 21 0 21 1 21 0 21 1 21 0 21 0 21 0 21 1 21 1 21 0 21 1 21 1 21 1 21 0 21 1 21 0 21 1 21 0 21 0 21 1 21 0 21 1 21 1 21 0 21 1 21 1 21 0 21 1 21 0 21 1 21 1 21 0 21 1 21 0 21 0 21 1 21 1 21 1 21 0 21 0 21 0 21 0 21 1...
result:
wrong answer Received wrong message.
Subtask #5:
score: 0
Wrong Answer
Test #22:
score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 4020kb,3956kb
input:
encode 4 2 1000 104801283 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0 ...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 4 2 10000 5 0 21 0 21 1 21 0 21 0 21 1 21 0 21 0 21 1 21 1 21 0 21 1 21 0 21 1 21 0 21 0 21 1 21 0 21 1 21 0 21 0 21 0 21 0 21 0 21 1 21 1 21 1 21 1 21 1 21 1 21 1 21 1 21 0 21 0 21 1 21 1 21 0 21 0 21 0 21 0 21 0 21 1 21 1 21 0 21 0 21 0 21 0 21 0 21 0 21 1 21 0 21 1 21 0 21 1 21 0 21 0 21 1...
result:
wrong answer Received wrong message.
Subtask #6:
score: 0
Wrong Answer
Test #40:
score: 0
Wrong Answer
time: 4ms = 1ms + 3ms
memory: 3884kb,3920kb
input:
encode 5 5 1000 711903075 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0 ...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 5 5 10000 5 1 28 0 28 0 28 0 28 1 28 0 28 0 28 1 28 1 28 0 28 1 28 0 28 0 28 1 28 0 28 1 28 0 28 0 28 0 28 1 28 0 28 1 28 1 28 0 28 0 28 1 28 1 28 0 28 0 28 0 28 0 28 0 28 0 28 0 28 0 28 1 28 0 28 1 28 1 28 1 28 1 28 0 28 1 28 1 28 0 28 1 28 1 28 1 28 1 28 1 28 0 28 0 28 0 28 0 28 0 28 0 28 1...
result:
wrong answer Received wrong message.
Subtask #7:
score: 0
Wrong Answer
Test #58:
score: 0
Wrong Answer
time: 6ms = 2ms + 4ms
memory: 3956kb,3968kb
input:
encode 6 7 1000 618359561 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0 ...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 6 7 10000 5 1 28 0 28 0 28 1 28 0 28 0 28 1 28 0 28 1 28 1 28 1 28 0 28 0 28 0 28 1 28 1 28 0 28 1 28 0 28 0 28 0 28 0 28 0 28 0 28 0 28 0 28 1 28 1 28 0 28 1 28 0 28 1 28 1 28 0 28 0 28 1 28 0 28 0 28 0 28 0 28 0 28 0 28 0 28 1 28 0 28 0 28 1 28 1 28 1 28 1 28 1 28 1 28 0 28 1 28 1 28 0 28 0...
result:
wrong answer Received wrong message.
Subtask #8:
score: 0
Wrong Answer
Test #76:
score: 0
Wrong Answer
time: 3ms = 2ms + 1ms
memory: 3860kb,4052kb
input:
encode 7 10 1000 211479294 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 7 10 10000 5 0 28 1 28 1 28 1 28 1 28 1 28 1 28 0 28 0 28 1 28 1 28 1 28 0 28 1 28 0 28 0 28 0 28 0 28 1 28 1 28 0 28 1 28 0 28 1 28 1 28 0 28 1 28 1 28 1 28 1 28 0 28 0 28 0 28 1 28 0 28 0 28 0 28 1 28 0 28 1 28 1 28 0 28 0 28 1 28 1 28 0 28 0 28 1 28 0 28 0 28 0 28 1 28 1 28 1 28 1 28 1 28 ...
result:
wrong answer Received wrong message.
Subtask #9:
score: 0
Wrong Answer
Test #94:
score: 0
Wrong Answer
time: 5ms = 2ms + 3ms
memory: 3880kb,3944kb
input:
encode 8 14 1000 963380543 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 8 14 10000 5 1 28 0 28 1 28 0 28 1 28 1 28 0 28 1 28 1 28 0 28 0 28 1 28 1 28 0 28 1 28 1 28 0 28 1 28 1 28 1 28 1 28 1 28 1 28 0 28 0 28 1 28 1 28 0 28 1 28 0 28 1 28 1 28 1 28 1 28 0 28 0 28 1 28 1 28 0 28 0 28 0 28 0 28 0 28 1 28 0 28 1 28 1 28 1 28 0 28 1 28 0 28 0 28 1 28 1 28 0 28 0 28 ...
result:
wrong answer Received wrong message.
Subtask #10:
score: 0
Wrong Answer
Test #112:
score: 0
Wrong Answer
time: 6ms = 2ms + 4ms
memory: 3856kb,3972kb
input:
encode 9 20 1000 49682627 0 0 0 0 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 24 0 0 25 0 0 26 0 0 27 0 0 28 0 0 29 0 0 30 0 0 31 0 0 32 0 0 33 0 0 34 0 0 35 0 0 36 0 0 37 0 0 38 0 0 39 0 0 ...
input:
w3xtong0sw70x24jk9va60aqnef9rzgx08fedfyimsmhm15g2p5yqjm98pbtrbqf9z0dajxh0cu2l8gd95xrgjw4v0zd2gnfxer874n1obsey5lrtj85pef4vcjvgyf3jgcdbrnnmrgc19osn0hdzg4gbo0hq25kq55c7tteedfxv1zzoif59fn45lzjo2x3h82ns90cuqigsh4g7cxx665n4vv15y2jbc0o7lusftiz71dfbfi7ag2i498kdd1rrwvtymjyy8c6mqr8hzny6x71lfr4qrlsh0929wz1p79q...
input:
decode 9 20 10000 5 1 28 0 28 0 28 0 28 1 28 1 28 0 28 0 28 1 28 1 28 1 28 0 28 0 28 0 28 0 28 1 28 1 28 1 28 0 28 1 28 1 28 1 28 1 28 0 28 1 28 0 28 1 28 1 28 1 28 0 28 0 28 1 28 1 28 1 28 0 28 1 28 0 28 0 28 1 28 1 28 1 28 0 28 0 28 0 28 0 28 1 28 1 28 0 28 1 28 0 28 1 28 1 28 1 28 0 28 0 28 1 28 ...
result:
wrong answer Received wrong message.