QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#226826#7629. Make SYSU Great Again IIcomeintocalm#WA 812ms65904kbC++20901b2023-10-26 16:52:122023-10-26 16:52:13

Judging History

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

  • [2023-10-26 16:52:13]
  • 评测
  • 测评结果:WA
  • 用时:812ms
  • 内存:65904kb
  • [2023-10-26 16:52:12]
  • 提交

answer

#include <cstdio>
#include <algorithm>
using namespace std;
const int MAXN = 2105, TEST = 7;
int MX;
int RD()
{
	return ((rand()%(65535)) ^ ((rand()%(65535)) << 14)) % MX;
}
int n;
int a[MAXN][MAXN];
int cnt[MAXN*MAXN*4];
int isfail;
int main()
{
	scanf("%d", &n);
	MX = 4*n*n;
	isfail = 0;
	for (int i = 1;i <= n; i++) {
		for (int j = 1;j <= n; j++) {
			int via = ~(a[i-1][j] | a[i][j-1]);
			int MI = RD() & via;
			for (int cas = 1; cas <= TEST; cas++) {
				int x = RD() & via;
				if (cnt[MI] > cnt[x]) {
					MI = x;
				}
			}
			if (cnt[MI] > 5) {
				isfail = 1;
				break;
			}
			cnt[MI]++;
			a[i][j] = MI;
		}
		if (isfail == 1) {
			break;
		}
	}
	if (isfail == 1) {
		printf("No\n");
	} else {
		printf("Yes\n");
		for (int i = 1;i <= n; i++) {
			for (int j = 1;j <= n; j++) {
				printf("%d%c", a[i][j], j==n?'\n':' ');
			}
		}
	}
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 1628kb

input:

4

output:

Yes
50 9 16 8
0 18 45 2
61 0 16 4
2 33 10 32

result:

ok 1

Test #2:

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

input:

1

output:

Yes
2

result:

ok 1

Test #3:

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

input:

2

output:

Yes
2 9
1 0

result:

ok 1

Test #4:

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

input:

3

output:

Yes
26 1 20
0 10 33
25 4 24

result:

ok 1

Test #5:

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

input:

5

output:

Yes
2 77 0 64 46
37 18 65 28 1
88 4 10 32 12
35 80 5 72 3
76 34 24 6 8

result:

ok 1

Test #6:

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

input:

8

output:

Yes
242 9 208 8 146 33 2 173
13 160 1 20 65 0 132 66
144 77 130 97 134 112 11 128
35 16 37 10 80 139 4 27
200 3 136 64 14 32 131 96
36 216 5 58 193 6 24 133
218 4 178 69 48 192 38 80
33 90 1 138 65 42 17 166

result:

ok 1

Test #7:

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

input:

13

output:

Yes
190 513 456 16 422 25 322 153 256 77 272 200 295
1 104 512 136 65 258 129 294 576 290 205 274 64
598 0 158 33 152 69 58 192 7 208 34 141 48
265 562 320 532 96 522 452 568 384 42 448 530 324
640 4 641 74 257 36 529 132 569 68 56 385 8
93 418 28 32 220 259 236 2 452 536 199 520 151
288 5 416 537 2...

result:

ok 1

Test #8:

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

input:

21

output:

Yes
1070 593 1408 604 162 1093 810 1041 704 277 96 896 59 1668 16 1164 528 77 1666 89 1570
448 1062 17 34 1353 130 1025 938 1045 192 1285 42 1600 307 1224 561 74 128 57 1412 0
1073 320 1702 328 164 1360 46 1040 138 768 104 1172 8 516 259 140 1072 269 64 19 1696
198 1593 256 646 72 1 400 587 1024 62 ...

result:

ok 1

Test #9:

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

input:

34

output:

Yes
1650 2441 528 2216 4114 841 2226 781 16 1133 2576 1060 467 1536 4596 3592 176 2829 114 2305 1750 2080 27 1728 2051 1668 51 2688 1142 9 2564 297 2130 1669
265 560 453 514 2369 162 1348 2178 1569 274 109 2690 4096 392 1026 212 771 128 3849 4130 264 65 416 2075 4548 1 2816 59 2304 562 137 2128 1832...

result:

ok 1

Test #10:

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

input:

55

output:

Yes
6202 641 8528 556 6290 777 4258 2385 1572 4553 8240 12 2483 4608 1432 2148 1672 4385 3286 801 6346 800 10263 40 4679 10376 1123 8588 4146 9609 2608 5385 10790 473 2050 1828 89 9218 6149 962 11324 322 1541 2338 8397 7442 8772 1192 6146 1240 6695 1096 8721 302 0
8705 5418 2049 144 1089 2096 9029 1...

result:

ok 1

Test #11:

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

input:

89

output:

Yes
20806 2729 20548 2816 21614 401 25642 4161 2076 6049 26708 6056 10263 16896 11416 21344 144 7949 162 11597 546 452 4667 10560 4235 11008 17519 6912 17634 11033 20544 8857 21766 8705 3462 12848 461 17458 6465 17078 5128 16450 1841 26638 545 19546 12544 17584 6726 8576 23623 296 641 30758 1792 225...

result:

ok 1

Test #12:

score: 0
Accepted
time: 2ms
memory: 2212kb

input:

100

output:

Yes
20402 8201 33168 3080 13074 3273 4098 3181 21136 10541 17488 11012 32771 6880 34052 2088 13456 35117 9730 4577 33286 2224 1611 22672 803 35988 12585 18052 12306 2857 13508 521 4258 32789 31242 384 38517 394 25121 194 36 15578 1 35462 17769 4230 2896 17448 6162 34636 14515 33088 28825 2306 25836 ...

result:

ok 1

Test #13:

score: 0
Accepted
time: 4ms
memory: 3104kb

input:

200

output:

Yes
60402 70665 2512 115720 13202 131081 7170 41133 23120 8621 67600 25348 138435 82720 137348 114984 15504 148077 75138 4193 77702 53360 10891 21520 100387 16404 80931 17028 133458 82601 133380 120457 2338 70869 41482 17856 100917 24714 545 16578 36 15578 1 155462 73897 19974 45072 134184 8402 6631...

result:

ok 1

Test #14:

score: 0
Accepted
time: 17ms
memory: 4556kb

input:

300

output:

Yes
20402 110665 2576 115848 262226 29577 34882 288301 6352 50477 73936 33540 275587 245856 272260 84008 131536 116269 145474 116385 141318 688 283659 207824 50211 196756 40803 262148 189842 69673 147972 109641 135202 272917 102538 19200 77877 131338 93921 294914 87460 264794 65537 289926 135209 110...

result:

ok 1

Test #15:

score: 0
Accepted
time: 31ms
memory: 7268kb

input:

400

output:

Yes
220402 524553 72912 434696 84114 275209 3074 361133 142672 348333 141840 16644 635587 148512 6788 114984 396944 82029 170114 353 397446 598640 137611 368656 154915 270356 72739 172932 597074 172201 613380 8841 396578 98517 12810 526528 116533 10378 185121 8386 480036 44250 1 635462 147625 69126 ...

result:

ok 1

Test #16:

score: 0
Accepted
time: 52ms
memory: 8488kb

input:

500

output:

Yes
820402 67593 833168 2056 816146 101193 812034 72173 795664 6381 25872 819204 162819 98400 808708 229480 538896 426029 18818 267809 10438 954416 10443 933904 102883 18452 664547 318468 74450 922665 10884 73 124706 262229 649098 64 798645 98378 152481 360514 152484 599066 2049 955462 27177 557318 ...

result:

ok 1

Test #17:

score: 0
Accepted
time: 63ms
memory: 11540kb

input:

600

output:

Yes
380402 12809 1180880 114696 1326994 16393 1127170 674989 4688 1130669 139280 819204 78531 181280 1385092 17704 1278096 279661 572034 476257 532614 1082736 1003659 1091088 868643 48148 393763 526468 1269842 38057 928260 65673 179234 1310933 111114 281024 176181 789898 1303073 525506 480036 3290 3...

result:

ok 1

Test #18:

score: 0
Accepted
time: 99ms
memory: 13872kb

input:

700

output:

Yes
1180402 562185 476112 538632 1245714 552073 393538 1683117 262160 130669 393232 634180 147971 99424 1048708 346408 135248 1632173 133186 1393441 141446 1840688 57419 1511440 584803 1250068 227 418052 1642130 131369 293508 229385 19234 590869 430218 600320 34357 530762 458785 1096578 196708 10955...

result:

ok 1

Test #19:

score: 0
Accepted
time: 144ms
memory: 17784kb

input:

800

output:

Yes
860402 20745 1976528 34312 862354 2135817 2050 1001133 43344 2375853 211472 1097988 210627 49184 794244 229672 1578640 67693 1466498 597345 393350 602736 1474955 77840 835875 14356 720931 46980 1261650 2097321 436228 2119305 1679650 398549 1124874 704704 69429 1978506 2101025 815298 197412 81532...

result:

ok 1

Test #20:

score: 0
Accepted
time: 184ms
memory: 21632kb

input:

900

output:

Yes
2180402 176201 2101136 114696 917842 29321 1114370 2154605 69648 1065133 107856 1841796 106563 148512 565764 1066408 3095120 49325 539138 1394145 2660870 197936 2377867 1287696 6499 550548 2396515 720900 2153234 925737 1154244 926473 1152034 270549 1182986 606208 2368821 725514 1369377 727234 24...

result:

ok 1

Test #21:

score: 0
Accepted
time: 204ms
memory: 24992kb

input:

1000

output:

Yes
1820402 2101257 1829072 266248 2812050 1316105 2793474 1130669 2798160 1396141 696848 262148 3195587 197664 2677636 1179688 2735504 1327725 133506 1151073 2229126 1864816 2329483 1843216 70691 51220 1648163 399748 2123346 1808809 271876 2738569 402978 2181333 829194 16576 3782197 278922 168481 3...

result:

ok 1

Test #22:

score: 0
Accepted
time: 321ms
memory: 34448kb

input:

1200

output:

Yes
4700402 16649 2632912 365064 2779282 267017 2305026 1331885 4326736 1130669 3019280 4229380 602819 181280 1385092 2644264 5613200 147565 3452034 610657 2231430 291440 5310859 315408 590115 326676 3276835 900 1269842 38057 3809284 68233 1619234 2230485 111114 1720512 2138933 5245066 2745121 14491...

result:

ok 1

Test #23:

score: 0
Accepted
time: 441ms
memory: 43488kb

input:

1400

output:

Yes
1180402 6310921 1016784 2121736 5671570 549897 2361858 5465517 2658896 1533101 2131984 4810244 432579 82976 1048708 346408 1749136 6291565 554882 5439585 272518 3802736 55435 5447696 2393379 4796436 2148643 4337796 3475538 657321 292868 4424329 18722 6456533 266250 6513088 265781 2261386 327713 ...

result:

ok 1

Test #24:

score: 0
Accepted
time: 630ms
memory: 54744kb

input:

1600

output:

Yes
3420402 606473 6588624 1066504 2406546 9586441 2435074 1201837 7113040 1204397 2656784 4329732 2197187 147488 8457860 3313960 4204176 1116269 3043458 4197729 2957446 1065584 434571 7880720 299299 5392404 589859 7792516 8917074 4194473 2533380 5248649 631074 3540181 8940042 6389952 548661 4587658...

result:

ok 1

Test #25:

score: -100
Wrong Answer
time: 812ms
memory: 65904kb

input:

1800

output:

Yes
11900402 16393 5513168 114696 4206994 279049 1126658 6439085 8663120 1130669 8697360 4851972 111299 148512 7176836 1074472 12814480 2102125 567426 1398113 11020422 1333104 2164875 1238544 10817571 1634068 4587555 9035908 5507922 2199721 8916228 1516169 562466 1319125 4431114 10223808 4363573 952...

result:

wrong answer The integer 32800 appears more than 5 times