QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#770215 | #6652. 着色 | ANIG# | RE | 0ms | 3676kb | C++14 | 892b | 2024-11-21 21:09:23 | 2024-11-21 21:09:24 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N=1111;
int n,p[N][N];
signed main(){
srand(time(NULL));
cin>>n;
if(n>20){
assert(0);
return 0;
}
for(int i=1,cc=0;i<n;i++){
for(int j=i+1;j<=n;j++){
cout<<(p[i][j]=p[j][i]=(i+j)%10);
}
cout<<"\n";
}
// for(int i=1;i<=n;i++){
// for(int j=1;j<=n;j++){
// for(int k=1;k<=n;k++){
// if(i==j||j==k||i==k)continue;
// if(p[i][j]==p[j][k]&&p[i][k]==p[j][k]){
// cout<<i<<" "<<j<<" "<<k<<endl;
// assert(0);
// }
// for(int a=1;a<=n;a++){
// for(int b=1;b<=n;b++){
// set<int>q={a,b,i,j,k};
// if(q.size()!=5)continue;
// if(p[i][j]==p[j][k]&&p[j][k]==p[k][a]&&p[k][a]==p[a][b]&&p[a][b]==p[b][i]){
// cout<<i<<" "<<j<<" "<<k<<" "<<a<<" "<<b<<endl;
// assert(0);
// }
// }
// }
// }
// }
// }
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3676kb
input:
2
output:
3
result:
ok Accepted.
Test #2:
score: -100
Runtime Error
input:
1000