QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#120076 | #6641. XOR Dice | ovoqwq | WA | 1ms | 3380kb | C++14 | 656b | 2023-07-06 13:10:59 | 2023-07-06 13:11:04 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define ROF(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
int n,k;
signed main(){
// freopen("dice.in","r",stdin);
// freopen("dice.out","w",stdout);
cin>>n>>k;
if(n==1){
puts("Yes");
FOR(i,1,6) cout<<k*i<<" ";
}else if(k==2){
puts("Yes");
if(n%2==0){
FOR(j,1,n){
FOR(i,1,6) cout<<k*i<<" ";
cout<<endl;
}
}else{
FOR(j,1,(n+1)/2){
FOR(i,1,6) cout<<k*(i-1)+1<<" ";
cout<<endl;
}
FOR(j,1,(n-1)/2){
FOR(i,1,6) cout<<k*i<<" ";
cout<<endl;
}
}
}else puts("No");
return (0-0);
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3380kb
input:
3 2
output:
Yes 1 3 5 7 9 11 1 3 5 7 9 11 2 4 6 8 10 12
result:
wrong output format Expected integer, but "Yes" found