玄关问为何我的结论不对&求条
  • 板块灌水区
  • 楼主A_grasser
  • 当前回复10
  • 已保存回复10
  • 发布时间2024/8/25 11:33
  • 上次更新2024/8/25 14:30:29
查看原帖
玄关问为何我的结论不对&求条
966803
A_grasser楼主2024/8/25 11:33

rt

题目链接 https://www.luogu.com.cn/problem/AT_relay_i

代码

#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
	cin>>n;
	if(n==2){
		cout<<-1;
		return 0;
	}
    for(int i=1;i<=n;i++){ 
		for(int j=i+1;j<=n;j++){
			printf("%d ",j);
		}
		for(int j=1;j<i;j++){
			printf("%d ",j);
		}
		printf("\n");
    }
    return 0;
}

奇怪的评测结果:

小号玄关

2024/8/25 11:33
加载中...