QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#86152 | #5361. 土豆评测机 | xiaoyaowudi | 95 | 2ms | 3412kb | C++14 | 2.0kb | 2023-03-09 14:26:57 | 2023-03-09 14:27:08 |
Judging History
answer
#include <iostream>
#include <algorithm>
constexpr int p(153353),c(75207);
#define o(x) std::cout<<(x)<<"\n"
int main()
{
o("assign i n");
o("label rp");
o("calc i i - 1");
o("read");
o("assign k x");
o("calc k k + 2654435769");
o("calc t k >> 16");
o("calc k k ^ t");
o("calc k k * 2246822507");
o("calc t x >> 13");
o("calc k k ^ t");
o("calc k k * 3266489909");
o("calc t k >> 16");
o("calc k k ^ t");
o("assign q k");
o("calc k k / 153353");
o("calc t k == 0");
o("cjump nm");
o("calc k k - 1");
o("label nm");
o("calc k k * 153353");
o("calc k k + 75207");
for(int i(0);i<15;++i)
{
o("calc p q * 2246822507");
o("calc j q >> 13");
o("calc q q ^ p");
o("calc q q ^ j");
o("calc q q + 2654435769");
o("calc t q & 65536");
std::cout<<"cjump nins"<<char('A'+i)<<"\n";
std::cout<<"calc a["<<i<<"] a["<<i<<"] ^ k"<<"\n";
std::cout<<"calc a["<<i+15<<"] a["<<i+15<<"] ^ x"<<"\n";
std::cout<<"label nins"<<char('A'+i)<<"\n";
}
o("assign t i");
o("cjump rp");
o("assign j 0");
o("assign i 0");
o("label al");
o("assign p 0");
o("assign k 0");
o("label ca");
o("calc t i >> k");
o("calc t t & 1");
o("calc t t ^ 1");
o("cjump nadd");
o("calc p p ^ a[k]");
o("label nadd");
o("calc k k + 1");
o("calc t 15 - k");
o("cjump ca");
o("calc t p % 153353");
o("calc t t - 75207");
o("cjump nna");
o("assign p 0");
o("assign k 0");
o("label cb");
o("calc t i >> k");
o("calc t t & 1");
o("calc t t ^ 1");
o("cjump nxor");
o("calc k k + 15");
o("calc p p ^ a[k]");
o("calc k k - 15");
o("label nxor");
o("calc k k + 1");
o("calc t 15 - k");
o("cjump cb");
o("assign k 0");
o("label check");
o("calc t k == j");
o("cjump ok");
o("calc t result[k] == p");
o("cjump nok");
o("calc k k + 1");
o("jump check");
o("label ok");
o("calc t j == m");
o("cjump nok");
o("assign result[j] p");
o("calc j j + 1");
o("label nok");
o("label nna");
o("calc i i + 1");
o("calc t 32768 - i");
o("cjump al");
o("end");
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3412kb
input:
1
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
wrong answer too many instructions
Test #2:
score: 10
Accepted
time: 1ms
memory: 3252kb
input:
2
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
ok AC
Test #3:
score: 5
Accepted
time: 0ms
memory: 3280kb
input:
3
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
ok AC
Test #4:
score: 5
Accepted
time: 0ms
memory: 3304kb
input:
4
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
ok AC
Test #5:
score: 15
Accepted
time: 0ms
memory: 3188kb
input:
5
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
ok AC
Test #6:
score: 10
Accepted
time: 2ms
memory: 3296kb
input:
6
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
ok AC
Test #7:
score: 10
Accepted
time: 0ms
memory: 3256kb
input:
7
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
ok AC
Test #8:
score: 40
Accepted
time: 2ms
memory: 3320kb
input:
8
output:
assign i n label rp calc i i - 1 read assign k x calc k k + 2654435769 calc t k >> 16 calc k k ^ t calc k k * 2246822507 calc t x >> 13 calc k k ^ t calc k k * 3266489909 calc t k >> 16 calc k k ^ t assign q k calc k k / 153353 calc t k == 0 cjump nm calc k k - 1 label nm calc k k * 153353 calc k k ...
result:
points 1.0 max #(cell used) = 30