QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#603224 | #9415. Matrix | ucup-team3474 | WA | 0ms | 3700kb | C++20 | 1004b | 2024-10-01 15:23:59 | 2024-10-01 15:24:00 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1919810,mod=1e9+7;
typedef long long ll;
typedef pair<ll,ll> PII;
ll n,m,k;
ll a[N],b[N];
char s[N];
ll dp[N];
int c[100][100];
bool check(){
int ans=0;
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++){
for(int k=i+1;k<=n;k++){
for(int u=j+1;u<=n;u++){
set<int> se;
se.insert(c[i][j]);
se.insert(c[k][j]);
se.insert(c[i][u]);
se.insert(c[k][u]);
if(se.size()==4) ans++;
}
}
}
}
return ans==1;
}
void __(){
scanf("%d",&n);
if(n>=4) puts("No");
else{
puts("Yes");
if(n==2){
puts("1 2\n3 4");
}else{
puts("3 2 6\n4 3 3\n3 1 5\n");
}
}
}
int main(){
int _=1;
// cin>>_;
while(_--){
__();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
2
output:
Yes 1 2 3 4
result:
ok Correct. (1 test case)
Test #2:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
3
output:
Yes 3 2 6 4 3 3 3 1 5
result:
ok Correct. (1 test case)
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3644kb
input:
4
output:
No
result:
wrong answer Jury has answer while participant hasn't. (test case 1)