QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#809673 | #9874. Matrix Construction | wjh111 | WA | 0ms | 3632kb | C++11 | 507b | 2024-12-11 16:41:07 | 2024-12-11 16:41:17 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n,m,i,t,j,u;
cin>>t;
while (t--){
u=1;
cin>>n>>m;
if (m%2==0){
for (i=0;i<n;i++){
for (j=0;j<m;j++){
cout<<u+j<<" ";
}
u+=m;
cout<<"\n";
}
}
else{
for (i=0;i<n;i++){
cout<<u<<" ";
for (j=1;j<=m/2;j++){
cout<<u+j*2<<" "<<u+j*2-1<<" ";
}
u+=m;
cout<<"\n";
}
}
}
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3632kb
input:
2 1 1 2 3
output:
1 1 3 2 4 6 5
result:
wrong answer Token parameter [name=ok] equals to "1", doesn't correspond to pattern "[yY][eE][sS]" (test case 1)