QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#235082#6641. XOR Dicejzh#AC ✓0ms3804kbC++20555b2023-11-02 13:25:072023-11-02 13:25:08

Judging History

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

  • [2023-11-02 13:25:08]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3804kb
  • [2023-11-02 13:25:07]
  • 提交

answer

#include<bits/stdc++.h>
#include <vector>

#define range(x) begin(x), end(x)

using namespace std;


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, d;
    cin >> n >> d;

    int ans = 0;
    for (int i = 0; i < n; i++) {
        vector<int> a = {0, d, (d << 6), (d << 12), (d) + (d << 6), (d) + (d << 12)};

        ans ^= a[rand() % 6];
        for (int c = 0; c < 6; c++) {
            cout << a[c] << " ";
        }
        cout << "\n";
        assert(ans % d == 0);
    }


    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3588kb

input:

3 2

output:

0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 

result:

ok Correct answer

Test #2:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

100 60

output:

0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
0 60 3840 245760 3900 245820 
...

result:

ok Correct answer

Test #3:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

99 2

output:

0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0 2 128 8192 130 8194 
0...

result:

ok Correct answer

Test #4:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

99 59

output:

0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
0 59 3776 241664 3835 241723 
...

result:

ok Correct answer

Test #5:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

93 17

output:

0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105 69649 
0 17 1088 69632 1105...

result:

ok Correct answer

Test #6:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

100 49

output:

0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
0 49 3136 200704 3185 200753 
...

result:

ok Correct answer

Test #7:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

100 5

output:

0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
0 5 320 20480 325 20485 
...

result:

ok Correct answer

Test #8:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

1 57

output:

0 57 3648 233472 3705 233529 

result:

ok Correct answer

Test #9:

score: 0
Accepted
time: 0ms
memory: 3524kb

input:

1 22

output:

0 22 1408 90112 1430 90134 

result:

ok Correct answer

Test #10:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

1 60

output:

0 60 3840 245760 3900 245820 

result:

ok Correct answer

Test #11:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

1 2

output:

0 2 128 8192 130 8194 

result:

ok Correct answer

Test #12:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

10 24

output:

0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 
0 24 1536 98304 1560 98328 

result:

ok Correct answer