QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#134867 | #6641. XOR Dice | PlentyOfPenalty# | AC ✓ | 1ms | 3560kb | C++20 | 530b | 2023-08-05 09:32:58 | 2023-08-05 09:32:59 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
#ifdef memset0
freopen("K.in","r",stdin);
#endif
int n,d;
const int b=128;
cin>>n>>d;
vector<vector<int>> a={
{},
{1},
{0,1},
{1,1},
{0,0,1},
{1,0,1},
};
vector<int> ans;
for(auto vec:a){
int s=0;
int w=1;
for(int i=0;i<vec.size();i++){
if(vec[i]){
s+=w*d;
}
w*=128;
}
ans.push_back(s);
}
for(int i=1;i<=n;i++){
for(int j=0;j<ans.size();j++){
cout<<ans[j]<<" \n"[j+1==ans.size()];
}
}
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3524kb
input:
3 2
output:
0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770
result:
ok Correct answer
Test #2:
score: 0
Accepted
time: 1ms
memory: 3444kb
input:
100 60
output:
0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 7740 983040 983100 0 60 7680 ...
result:
ok Correct answer
Test #3:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
99 2
output:
0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 32768 32770 0 2 256 258 ...
result:
ok Correct answer
Test #4:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
99 59
output:
0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 7611 966656 966715 0 59 7552 ...
result:
ok Correct answer
Test #5:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
93 17
output:
0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 2193 278528 278545 0 17 2176 ...
result:
ok Correct answer
Test #6:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
100 49
output:
0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 6321 802816 802865 0 49 6272 ...
result:
ok Correct answer
Test #7:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
100 5
output:
0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 81920 81925 0 5 640 645 ...
result:
ok Correct answer
Test #8:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
1 57
output:
0 57 7296 7353 933888 933945
result:
ok Correct answer
Test #9:
score: 0
Accepted
time: 0ms
memory: 3448kb
input:
1 22
output:
0 22 2816 2838 360448 360470
result:
ok Correct answer
Test #10:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
1 60
output:
0 60 7680 7740 983040 983100
result:
ok Correct answer
Test #11:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
1 2
output:
0 2 256 258 32768 32770
result:
ok Correct answer
Test #12:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
10 24
output:
0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240 0 24 3072 3096 393216 393240
result:
ok Correct answer