QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#86173 | #5361. 土豆评测机 | xiaoyaowudi | 95 | 2ms | 3452kb | C++14 | 2.2kb | 2023-03-09 14:48:21 | 2023-03-09 14:48:24 |
Judging History
answer
#include <iostream>
#include <algorithm>
constexpr int p(153353),c(75207);
#define o(x) std::cout<<(x)<<"\n"
int main()
{
int T;std::cin>>T;
o("assign i n");
o("label rp");
o("calc i i - 1");
o("read");
if(T==1)
{
o("calc k k ^ x");
o("cjump rp");
o("assign result[0] k");
o("end");
return 0;
}
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3332kb
input:
1
output:
assign i n label rp calc i i - 1 read calc k k ^ x cjump rp assign result[0] k end
result:
wrong answer WA
Test #2:
score: 10
Accepted
time: 2ms
memory: 3296kb
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: 2ms
memory: 3228kb
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: 3448kb
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: 3420kb
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: 3452kb
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: 2ms
memory: 3448kb
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: 3264kb
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