QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#487925 | #6641. XOR Dice | ucup-team052# | AC ✓ | 1ms | 3760kb | C++23 | 993b | 2024-07-23 13:02:48 | 2024-07-23 13:02:49 |
Judging History
answer
#include<bits/stdc++.h>
#ifdef xay5421
#define D(...) fprintf(stderr,__VA_ARGS__)
#define DD(...) D(#__VA_ARGS__ "="),debug_helper::debug(__VA_ARGS__),D("\n")
#include"/home/xay5421/debug.hpp"
#else
#define D(...) ((void)0)
#define DD(...) ((void)0)
#endif
#define pb push_back
#define eb emplace_back
#define SZ(x) ((int)(x).size())
#define each(x,v) for(auto&x:v)
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
template<class T>void rd(T&x){int f=0,c;while(!isdigit(c=getchar()))f^=!(c^45);x=(c&15);while(isdigit(c=getchar()))x=x*10+(c&15);if(f)x=-x;}
template<class T>void pt(T x,int c=-1){if(x<0)putchar('-'),x=-x;if(x>9)pt(x/10);putchar(x%10+48);if(c!=-1)putchar(c);}
using namespace std;
using LL=long long;
using ULL=unsigned long long;
int n,d;
int main(){
rd(n),rd(d);
rep(_,1,n){
rep(i,0,5){
int s=0;
rep(j,0,2)if(i>>j&1){
s+=d<<(j*6);
}
printf("%d ",s);
}
puts("");
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3644kb
input:
3 2
output:
0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194
result:
ok Correct answer
Test #2:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
100 60
output:
0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 0 60 3840 3900 245760 245820 ...
result:
ok Correct answer
Test #3:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
99 2
output:
0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0 2 128 130 8192 8194 0...
result:
ok Correct answer
Test #4:
score: 0
Accepted
time: 1ms
memory: 3736kb
input:
99 59
output:
0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 0 59 3776 3835 241664 241723 ...
result:
ok Correct answer
Test #5:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
93 17
output:
0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632 69649 0 17 1088 1105 69632...
result:
ok Correct answer
Test #6:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
100 49
output:
0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 0 49 3136 3185 200704 200753 ...
result:
ok Correct answer
Test #7:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
100 5
output:
0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 0 5 320 325 20480 20485 ...
result:
ok Correct answer
Test #8:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
1 57
output:
0 57 3648 3705 233472 233529
result:
ok Correct answer
Test #9:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
1 22
output:
0 22 1408 1430 90112 90134
result:
ok Correct answer
Test #10:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
1 60
output:
0 60 3840 3900 245760 245820
result:
ok Correct answer
Test #11:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
1 2
output:
0 2 128 130 8192 8194
result:
ok Correct answer
Test #12:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
10 24
output:
0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328 0 24 1536 1560 98304 98328
result:
ok Correct answer