QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#185752#6641. XOR Diceucup-team870#AC ✓0ms3804kbC++17372b2023-09-22 16:08:202023-09-22 16:08:20

Judging History

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

  • [2023-09-22 16:08:20]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3804kb
  • [2023-09-22 16:08:20]
  • 提交

answer

#include<bits/stdc++.h>
#define For(i,j,k) for(int i=j;i<=k;++i)
using namespace std;
int main(){
    int n,d; cin>>n>>d;
    int b[5]; b[0]=d; b[1]=d*128; b[2]=d*128*128;
    For(i,1,n){
        For(j,0,5){
            int s=0;
            For(k,0,2) if (j&(1<<k)) s+=b[k];
            printf("%d ",s);
        }
        printf("\n");
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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

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 
...

result:

ok Correct answer

Test #3:

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

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 
...

result:

ok Correct answer

Test #4:

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

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 
...

result:

ok Correct answer

Test #5:

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

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 
...

result:

ok Correct answer

Test #6:

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

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 
...

result:

ok Correct answer

Test #7:

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

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 
...

result:

ok Correct answer

Test #8:

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

input:

1 57

output:

0 57 7296 7353 933888 933945 

result:

ok Correct answer

Test #9:

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

input:

1 22

output:

0 22 2816 2838 360448 360470 

result:

ok Correct answer

Test #10:

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

input:

1 60

output:

0 60 7680 7740 983040 983100 

result:

ok Correct answer

Test #11:

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

input:

1 2

output:

0 2 256 258 32768 32770 

result:

ok Correct answer

Test #12:

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

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