QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#374504#5275. Joking?zhouhuanyiWA 1ms3848kbC++141.8kb2024-04-02 14:48:482024-04-02 14:48:49

Judging History

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

  • [2024-04-02 14:48:49]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3848kb
  • [2024-04-02 14:48:48]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<algorithm>
#define N 600
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
int n,delta[N+1]={0,2,3,5,1,4,4,1,5,2,3,3,5,1,4,2,1,2,3,5,4,5,4,1,3,2,1,2,3,4,5,5,2,3,1,4,5,1,3,2,4,4,5,2,1,3,3,4,1,2,5,3,2,4,1,5,1,4,5,2,3,2,4,3,1,5,4,1,3,2,5,3,2,5,4,1,4,1,3,5,2,5,2,3,4,1,4,1,5,3,2,3,4,2,1,5,3,4,5,2,1,2,5,3,1,4,3,1,5,4,2,5,2,4,1,3,5,2,1,3,4,4,2,3,5,1,4,5,1,3,2,2,4,5,1,3,2,5,1,4,3,5,3,1,2,4,2,3,1,4,5,1,4,3,2,5,1,5,4,3,2,4,3,2,5,1,1,2,4,5,3,5,3,4,2,1,4,3,2,1,5,1,4,2,5,3,1,2,5,4,3,4,3,5,2,1,5,4,3,2,1,3,1,4,2,5,5,1,4,2,3,5,1,3,4,2,3,1,2,5,4,2,1,5,4,3,1,5,3,2,4,2,3,1,5,4,1,5,4,2,3,2,4,1,5,3,1,5,2,3,4,3,2,4,5,1,5,3,1,4,2,1,3,2,4,5,2,4,3,5,1,3,2,1,5,4,5,4,2,1,3,4,3,1,5,2,4,3,5,1,2,2,3,5,4,1,2,1,4,5,3,3,5,2,1,4,5,1,2,3,4,2,3,4,1,5,4,2,5,3,1,1,4,2,3,5,1,3,5,2,4,3,5,4,2,1,4,2,3,1,5,5,2,4,3,1,5,1,2,4,3,5,4,2,3,1,1,5,3,4,2,1,3,4,2,5,4,1,2,3,5,4,3,1,2,5,5,3,4,1,2,3,1,5,2,4,3,4,1,5,2,1,3,4,5,2,4,5,1,2,3,5,3,2,4,1,1,3,2,5,4,4,5,3,2,1,2,1,4,3,5,2,1,3,5,4,5,2,1,4,3,3,5,2,4,1,4,2,1,5,3,4,5,2,3,1,2,3,4,5,1,4,1,2,5,3,4,2,5,1,3,3,5,1,2,4,2,4,1,3,5,1,3,5,4,2,2,5,1,3,4,3,2,5,1,4,2,1,3,4,5,1,5,2,4,3,3,4,5,1,2,1,2,4,3,5,2,5,3,4,1,1,4,5,3,2,2,4,5,3,1,5,1,4,3,2,5,4,3,1,2,3,4,2,5,1,1,4,3,5,2,5,3,2,1,4,5,4,1,2,3,3,1,4,5,2,2,5,4,3,1,4,5,3,1,2,3,2,1,4,5,1,2,5,3,4,3,5,4,1,2,2,1,5,3,4,3,1,2,4,5,2,5,4,1,3,4,2,1,3,5},num[N+1];
bool used[N+1];
int main()
{
	n=read();
	for (int i=1;i<=n;++i)
		for (int j=1;j<=N;++j)
			if (delta[j]==i)
				used[j]=1;
	for (int i=1;i<=N;++i) num[i]=num[i-1]+used[i];
	puts("120");
	for (int i=1;i<=n;++i)
	{
		for (int j=1;j<=N;++j)
			if (delta[j]==i)
				printf("%d ",num[j]);
		puts("");
	}
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3848kb

input:

2

output:

120
2 3 5 7 9 11 14 15 18 19 22 23 26 27 30 31 34 35 38 40 42 43 46 48 50 51 54 56 57 60 61 63 66 67 70 72 73 75 78 80 81 83 85 87 90 91 94 95 98 99 102 103 105 108 110 112 113 115 118 120 122 123 126 128 129 131 134 136 138 139 142 143 145 147 149 151 153 155 157 159 162 163 166 168 170 172 174 176...

result:

ok n = 2, max_relative_diff = 0.000%

Test #2:

score: 0
Accepted
time: 1ms
memory: 3740kb

input:

3

output:

120
3 4 8 10 13 16 21 22 26 29 33 34 39 40 45 46 51 52 57 60 63 65 68 71 75 76 80 83 86 90 91 94 99 100 105 108 109 112 117 120 122 124 127 131 134 136 141 142 146 148 153 155 157 162 165 167 170 173 177 179 183 184 189 192 193 196 201 204 207 208 213 214 217 220 224 227 230 233 235 238 243 244 249 ...

result:

ok n = 3, max_relative_diff = 0.036%

Test #3:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

4

output:

120
3 6 10 13 18 21 27 29 35 39 44 45 52 54 60 62 68 70 76 80 83 86 91 94 100 102 107 110 114 119 121 125 132 133 140 144 145 149 156 160 162 165 169 174 178 181 187 189 195 197 204 206 209 216 219 223 227 231 236 238 243 245 252 256 257 261 268 272 276 277 284 285 289 294 299 303 306 311 313 318 32...

result:

ok n = 4, max_relative_diff = 0.172%

Test #4:

score: -100
Wrong Answer
time: 1ms
memory: 3744kb

input:

5

output:

120
4 7 13 16 23 26 34 37 44 48 54 56 64 67 75 77 85 87 94 100 104 107 114 118 125 128 134 138 143 148 151 156 165 166 175 179 181 186 195 200 202 207 212 217 222 226 233 236 243 246 255 258 261 270 273 279 283 289 295 297 304 307 314 320 321 326 335 339 345 347 355 356 361 367 373 379 382 388 391 3...

result:

wrong answer n = 5, max_relative_diff = 0.389%