QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#770238#6652. 着色ANIG#RE 1ms3632kbC++14832b2024-11-21 21:13:102024-11-21 21:13:10

Judging History

你现在查看的是最新测评结果

  • [2024-11-21 21:13:10]
  • 评测
  • 测评结果:RE
  • 用时:1ms
  • 内存:3632kb
  • [2024-11-21 21:13:10]
  • 提交

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

output:


result: