QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#875906 | #9874. Matrix Construction | windcity# | WA | 0ms | 3840kb | C++14 | 389b | 2025-01-30 14:10:54 | 2025-01-30 14:10:54 |
Judging History
answer
#include<cmath>
#include<cstdio>
#include<vector>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n,m;
scanf("%d%d",&n,&m);
printf("YES\n");
for(register int i=1;i<=n;++i){
for(register int j=1;j<=m;++j)
printf("%d ",(i-1)*m+j);
printf("\n");
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3840kb
input:
2 1 1 2 3
output:
YES 1 YES 1 2 3 4 5 6
result:
wrong answer Duplicate sum found for adjacent elements at (1,2) and (1,3) (test case 2)