QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#127136 | #6641. XOR Dice | oreoioiwy# | AC ✓ | 1ms | 3856kb | C++17 | 1.2kb | 2023-07-19 13:24:41 | 2023-07-19 13:24:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// #define tpyeinput int
// inline char nc() {static char buf[1000000],*p1=buf,*p2=buf;return p1==p2&&(p2=(p1=buf)+fread(buf,1,1000000,stdin),p1==p2)?EOF:*p1++;}
// inline void read(tpyeinput &sum) {char ch=nc();sum=0;while(!(ch>='0'&&ch<='9')) ch=nc();while(ch>='0'&&ch<='9') sum=(sum<<3)+(sum<<1)+(ch-48),ch=nc();}
template<typename T>
void read(T &x) {
int f = 1;
x = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + (ch ^ 48);
ch = getchar();
}
x *= f;
}
const int N = 1e6+10, M = 2*N;
void solve() {
int n,d; read(n); read(d);
int a[6];
a[0] = d;
a[1] = d << 6;
a[2] = a[0] + a[1];
a[3] = a[1] << 6;
a[4] = a[0] + a[3];
a[5] = a[3] + a[1];
for(int i=0;i<n;i++)
{
for(int i=0;i<6;i++)
{
printf("%d ", a[i]);
}
puts("");
}
}
int main() {
#ifdef LOCAL_TEST
freopen("test.in", "r", stdin);
#endif
int times = 1;
// read(times);
while(times--) {
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3784kb
input:
3 2
output:
2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320
result:
ok Correct answer
Test #2:
score: 0
Accepted
time: 1ms
memory: 3588kb
input:
100 60
output:
60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 245820 249600 60 3840 3900 245760 ...
result:
ok Correct answer
Test #3:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
99 2
output:
2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192 8194 8320 2 128 130 8192...
result:
ok Correct answer
Test #4:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
99 59
output:
59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 241723 245440 59 3776 3835 241664 ...
result:
ok Correct answer
Test #5:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
93 17
output:
17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105 69632 69649 70720 17 1088 1105...
result:
ok Correct answer
Test #6:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
100 49
output:
49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 200753 203840 49 3136 3185 200704 ...
result:
ok Correct answer
Test #7:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
100 5
output:
5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 20480 20485 20800 5 320 325 ...
result:
ok Correct answer
Test #8:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
1 57
output:
57 3648 3705 233472 233529 237120
result:
ok Correct answer
Test #9:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
1 22
output:
22 1408 1430 90112 90134 91520
result:
ok Correct answer
Test #10:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
1 60
output:
60 3840 3900 245760 245820 249600
result:
ok Correct answer
Test #11:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
1 2
output:
2 128 130 8192 8194 8320
result:
ok Correct answer
Test #12:
score: 0
Accepted
time: 1ms
memory: 3592kb
input:
10 24
output:
24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560 98304 98328 99840 24 1536 1560...
result:
ok Correct answer