QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#662623 | #9415. Matrix | TheShuMo# | WA | 0ms | 3692kb | C++14 | 1.4kb | 2024-10-21 07:48:57 | 2024-10-21 07:48:58 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define fs first
#define se second
namespace IO {
#define int long long
#define gh getchar
inline int read(){char ch=gh();int x=0;bool t=0;while(ch<'0'||ch>'9') t|=ch=='-',ch=gh();while(ch>='0'&&ch<='9') x=x*10+(ch^48),ch=gh();return t?-x:x;}
inline char getc(){char ch=gh();while(ch<'a'||ch>'z') ch=gh();return ch;}
inline void write(int x){if(x < 0){putchar('-');x = -x;}if(x > 9){write(x / 10);}putchar((x % 10 + '0'));}
}
#define Tp template<typename T>
#define Ts template<typename T,typename... Ar>
using namespace IO;
using namespace std;
namespace Debug{
Tp void _debug(char* f,T t){cerr<<f<<'='<<t<<endl;}
Ts void _debug(char* f,T x,Ar... y){while(*f!=',') cerr<<*f++;cerr<<'='<<x<<",";_debug(f+1,y...);}
#ifdef LOCAL
#define gdb(...) _debug((char*)#__VA_ARGS__,__VA_ARGS__)
#else
#define gdb(...) void()
#endif
}using namespace Debug;
const int Maxn = 100010, mod = 1e9 + 7;
int a[60][60];
signed main(){
int n = read();
puts("Yes");
for(int i = 1; i <= n; i++) cout << i << ' ';
puts("");
for(int i = n + 1; i < n + n; i++){
for(int j = 1; j <= n; j++){
if(j == 1){
cout << i << ' ';
}
else if(i == n + n - 1 and j == n){
cout << n + n << endl;
}else cout << 1 << ' ';
}
if(i != n + n - 1)puts("");
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3692kb
input:
2
output:
Yes 1 2 3 4
result:
ok Correct. (1 test case)
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3560kb
input:
3
output:
Yes 1 2 3 4 1 1 5 1 6
result:
wrong answer The number of quadruples 3 is invalid. (test case 1)