QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#122707#6641. XOR Dicewnmrmr#AC ✓2ms3488kbC++23939b2023-07-10 22:36:552023-07-10 22:36:56

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-10 22:36:56]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3488kb
  • [2023-07-10 22:36:55]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
 
#define all(x) x.begin(), x.end()
 
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T){ cerr << ' ' << H; dbg_out(T...); }
#define dbg(...) cerr<<"(" << #__VA_ARGS__<<"):" , dbg_out(__VA_ARGS__) , cerr << endl

#define pb push_back
#define int long long

int n, d;

void solve () {
    cin >> n >> d;
    // temos que achar 3 multiplos de d que nao se intersectam

    vector<int> bit (3);
    bit[0] = d; bit[1] = 64 * bit[0]; bit[2] = 64 * bit[1];

    while (n--) {
        for (int mask = 0; mask < 6; mask++) {
            int dice = 0;
            for (int j = 0; j < 3; j++) if ((1 << j) & mask) {
                dice += bit[j];
            }

            cout << dice << " ";
        }
        cout << "\n";
    }
}

signed main () {
    ios::sync_with_stdio(0);cin.tie(0);
    solve ();
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3388kb

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: 3408kb

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: 2ms
memory: 3444kb

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: 0ms
memory: 3444kb

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: 0ms
memory: 3468kb

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: 2ms
memory: 3400kb

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: 2ms
memory: 3484kb

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: 1ms
memory: 3488kb

input:

1 57

output:

0 57 3648 3705 233472 233529 

result:

ok Correct answer

Test #9:

score: 0
Accepted
time: 2ms
memory: 3432kb

input:

1 22

output:

0 22 1408 1430 90112 90134 

result:

ok Correct answer

Test #10:

score: 0
Accepted
time: 2ms
memory: 3396kb

input:

1 60

output:

0 60 3840 3900 245760 245820 

result:

ok Correct answer

Test #11:

score: 0
Accepted
time: 2ms
memory: 3488kb

input:

1 2

output:

0 2 128 130 8192 8194 

result:

ok Correct answer

Test #12:

score: 0
Accepted
time: 2ms
memory: 3460kb

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