QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#127099 | #6641. XOR Dice | xiaoxing666# | WA | 0ms | 3592kb | C++17 | 415b | 2023-07-19 12:57:31 | 2023-07-19 12:57:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n, d;
int main()
{
scanf("%d %d", &n, &d);
int k = (int)(log2(d & -d) + 1);
//cout<<k<<endl;
int tmp = d<<k;
vector<int> ans;
for (int i = 1; i <= 6; i++)
{
tmp = tmp << 1;
//cout<<tmp<<endl;
ans.push_back(tmp);
}
for(int i=1;i<=n;i++)
{
for(int j=0;j<n;j++)
{
cout<<ans[j]<<" \n"[j==n-1];
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3592kb
input:
3 2
output:
16 32 64 16 32 64 16 32 64
result:
wrong answer Invalid output