QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#32151#1807. Distribute the BarsAppleblue17WA 1ms3780kbC++415b2022-05-17 20:47:482022-05-17 20:47:50

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-17 20:47:50]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3780kb
  • [2022-05-17 20:47:48]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n;

int main(){
	cin>>n;
	if(n%2==0 && n>2){
		printf("%d\n",n/2);
		for(int i=1;i<=n/2;i++) printf("2 %d %d\n",i,n+1-i);
		return 0;
	}
	for(int i=2;i<n;i++){
		if(i*i==n){
			printf("%d\n",i);
			for(int j=0;j<i;j++){
				printf("%d ",i);
				for(int t=0;t<i;t++){
					printf("%d ",t*i+(t+j)%i+1);
				}
				printf("\n");
			}
			
		}
	}
}

详细

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3780kb

input:

4

output:

2
2 1 4
2 2 3

result:

wrong answer Even numbers not allowed