QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#270600#7868. 天空度假山庄grass8cow0 37ms3928kbC++17469b2023-12-01 10:16:112023-12-01 10:16:12

Judging History

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

  • [2023-12-01 10:16:12]
  • 评测
  • 测评结果:0
  • 用时:37ms
  • 内存:3928kb
  • [2023-12-01 10:16:11]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n,x=1,m;
void P(int z){
	x=(x+z-1)%n+1;x=(x+n-1)%n+1;
	printf(" %d",x);
}
int main(){
	scanf("%d%d",&n,&m);
	printf("1");
	for(int ii=1;ii<n;ii++){
		int sb=(m-1)/4;
		for(int i=1;i<=sb;i++){
			P(4*i+1),P(-4*i);
			P(4*i+2),P(-4*i-3);
		}
		if(m%4==1)P(1);
		if(m%4==2)P(4*sb+5),P(-(4*sb+4));
		if(m%4==3)P(4*sb+6),P(-(4*sb+4)),P(-1);
		if(m%4==0)P(2),P(1),P(4*sb+4),P(-(4*sb+6));
	}
	return 0;
} 

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

8216 1

output:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...

result:

wrong output format Extra information in the output file

Subtask #2:

score: 0
Wrong Answer

Test #5:

score: 0
Wrong Answer
time: 37ms
memory: 3840kb

input:

86132 9

output:

1 6 2 8 1 10 2 12 1 2 7 3 9 2 11 3 13 2 3 8 4 10 3 12 4 14 3 4 9 5 11 4 13 5 15 4 5 10 6 12 5 14 6 16 5 6 11 7 13 6 15 7 17 6 7 12 8 14 7 16 8 18 7 8 13 9 15 8 17 9 19 8 9 14 10 16 9 18 10 20 9 10 15 11 17 10 19 11 21 10 11 16 12 18 11 20 12 22 11 12 17 13 19 12 21 13 23 12 13 18 14 20 13 22 14 24 1...

result:

wrong output format Extra information in the output file

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Wrong Answer

Test #16:

score: 0
Wrong Answer
time: 18ms
memory: 3792kb

input:

1777 229

output:

1 6 2 8 1 10 2 12 1 14 2 16 1 18 2 20 1 22 2 24 1 26 2 28 1 30 2 32 1 34 2 36 1 38 2 40 1 42 2 44 1 46 2 48 1 50 2 52 1 54 2 56 1 58 2 60 1 62 2 64 1 66 2 68 1 70 2 72 1 74 2 76 1 78 2 80 1 82 2 84 1 86 2 88 1 90 2 92 1 94 2 96 1 98 2 100 1 102 2 104 1 106 2 108 1 110 2 112 1 114 2 116 1 118 2 120 1...

result:

wrong output format Extra information in the output file

Subtask #5:

score: 0
Skipped

Dependency #1:

0%