QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#770238 | #6652. 着色 | ANIG# | RE | 1ms | 3632kb | C++14 | 832b | 2024-11-21 21:13:10 | 2024-11-21 21:13:10 |
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;
assert(n<1000);
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-i-j+10)%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);
}
}
}
}
}
}
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3632kb
input:
2
output:
9
result:
ok Accepted.
Test #2:
score: -100
Runtime Error
input:
1000