QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#256595 | #7629. Make SYSU Great Again II | ucup-team2580 | RE | 414ms | 33780kb | C++20 | 1.2kb | 2023-11-18 20:27:06 | 2023-11-18 20:27:07 |
Judging History
answer
//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int ans[2002][2002];
int cnt[4004000];
mt19937 rnd(time(NULL));
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
cout<<"Yes"<<endl;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
int rm=((1<<30)-1)^(ans[i-1][j]|ans[i][j-1]);
int res=-1;
for(int x=0;x<20;x++)
{
int cho=rnd()%(4*n*n)&rm;
if(res==-1||cnt[cho]<cnt[res])
res=cho;
}
cout<<(ans[i][j]=res)<<" ";
cnt[res]++;
}
cout<<endl;
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3500kb
input:
4
output:
Yes 6 17 34 29 9 36 25 0 18 1 4 10 40 22 33 20
result:
ok 1
Test #2:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
1
output:
Yes 2
result:
ok 1
Test #3:
score: 0
Accepted
time: 0ms
memory: 3460kb
input:
2
output:
Yes 6 1 0 14
result:
ok 1
Test #4:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
3
output:
Yes 18 13 0 33 2 4 24 5 10
result:
ok 1
Test #5:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
5
output:
Yes 30 1 6 73 54 96 20 64 50 72 12 34 28 65 32 17 4 35 8 80 70 9 16 68 33
result:
ok 1
Test #6:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
8
output:
Yes 134 17 98 29 2 60 65 24 89 32 132 66 40 67 4 34 164 27 96 8 210 36 211 12 72 0 19 64 41 130 44 129 178 13 224 21 192 45 144 100 68 48 6 104 7 80 47 128 152 5 168 3 184 1 208 15 38 88 4 112 3 216 37 16
result:
ok 1
Test #7:
score: 0
Accepted
time: 1ms
memory: 3508kb
input:
13
output:
Yes 554 145 96 17 556 144 514 337 138 85 168 23 360 401 10 5 482 16 358 9 132 544 2 20 416 6 102 513 136 532 41 0 566 320 13 528 107 516 496 137 114 4 234 256 50 384 54 128 327 512 267 516 82 264 195 276 226 521 32 129 312 640 90 36 283 296 65 304 130 269 34 652 352 134 305 644 67 164 534 160 ...
result:
ok 1
Test #8:
score: 0
Accepted
time: 1ms
memory: 3568kb
input:
21
output:
Yes 662 1025 956 65 1668 104 914 1061 218 1281 548 83 1676 1 46 209 1314 133 1394 141 1536 296 532 2 780 82 1153 4 344 545 140 1296 640 33 1500 513 44 704 1322 132 48 66 1216 40 1232 34 1288 6 1121 516 1346 0 171 276 202 512 228 18 1060 80 1321 194 1044 41 454 544 17 582 1192 262 168 528 488 1028...
result:
ok 1
Test #9:
score: 0
Accepted
time: 1ms
memory: 3768kb
input:
34
output:
Yes 4462 2705 76 1201 2636 400 1134 2065 194 553 4484 3187 900 1121 2050 4521 2070 737 3090 393 2676 1282 2581 1410 48 4430 657 4424 3601 358 4096 2140 1442 4177 2193 4200 1 2824 1056 13 896 42 1300 192 18 772 1130 260 217 1024 193 3086 321 3606 257 2096 130 2124 1283 672 2056 1175 40 4241 2574 0 2...
result:
ok 1
Test #10:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
55
output:
Yes 9014 1161 8464 5709 8240 2372 4634 421 5722 2309 5632 2099 9728 4145 3526 553 2374 5665 214 11017 1216 4894 10337 10 4484 1594 4417 1664 6473 134 8009 32 5718 2313 8436 5121 820 9408 772 6353 296 3138 5012 2056 4662 8576 614 8328 5395 8908 3331 4228 10563 5792 8479 1025 10758 5192 304 3780 4129...
result:
ok 1
Test #11:
score: 0
Accepted
time: 2ms
memory: 4132kb
input:
89
output:
Yes 15258 17413 2488 20481 8516 16552 4690 19629 12370 17965 6144 17531 8964 1129 12694 2113 5554 2561 20494 3441 8204 17266 12297 18578 9732 16394 13553 768 18645 4354 165 22784 1578 20817 9248 23169 1300 12416 19268 13313 19004 8386 17420 2784 24582 480 5146 2692 1347 10784 16451 4120 1479 20488 1...
result:
ok 1
Test #12:
score: 0
Accepted
time: 0ms
memory: 4084kb
input:
100
output:
Yes 5614 18945 12716 2049 8476 5152 19102 12609 1554 35305 4628 28003 532 5345 10242 21817 33414 9521 4674 8345 17444 14866 389 34418 6412 25234 4205 34576 4161 35334 5489 10252 21602 8209 428 16977 10240 37064 26420 34825 9376 19210 68 34344 28994 36 9882 6148 10123 16384 199 15640 17091 5148 515 6...
result:
ok 1
Test #13:
score: 0
Accepted
time: 3ms
memory: 5040kb
input:
200
output:
Yes 5614 57857 69100 49153 8476 5152 60126 1281 530 35305 91668 2403 62996 289 14338 17721 33414 90161 37762 19481 143716 98962 13637 150194 45388 17042 44333 66128 51585 75270 39345 132172 102562 3153 45484 84561 41088 86344 9780 35081 91168 33674 18500 74280 4482 44068 17114 135172 126027 256 5632...
result:
ok 1
Test #14:
score: 0
Accepted
time: 11ms
memory: 6420kb
input:
300
output:
Yes 165614 65537 43564 81921 166556 20576 140062 33857 88722 270697 54292 131619 64596 196641 54338 207545 49158 81009 278786 76377 135460 27154 99397 9010 198732 16402 141229 32784 277185 32774 134769 140 223522 145 288620 39057 148288 102408 280948 13449 166176 345098 36868 281576 107522 16676 732...
result:
ok 1
Test #15:
score: 0
Accepted
time: 20ms
memory: 8176kb
input:
400
output:
Yes 5614 534529 378860 143361 284 333344 51422 532993 481554 34025 604436 442467 528660 361505 14338 181817 333958 148017 37250 19993 463204 525458 2117 632498 6476 25234 364845 132176 596097 165638 14513 608076 262306 105553 8620 416849 896 438344 18484 33545 218144 41866 330820 8744 382338 133156 ...
result:
ok 1
Test #16:
score: 0
Accepted
time: 40ms
memory: 10344kb
input:
500
output:
Yes 45614 330817 541356 233729 804380 10528 331934 565313 88722 270697 542228 371107 135252 270625 694338 335929 186502 49 54146 591897 315940 10258 644485 273010 37132 985234 62573 656144 265345 733254 264113 694348 337698 577745 75308 807249 142848 639112 628 355593 561696 346250 660484 57960 5972...
result:
ok 1
Test #17:
score: 0
Accepted
time: 60ms
memory: 14648kb
input:
600
output:
Yes 165614 1145089 132332 1169409 919324 1132576 792542 8193 481554 8937 1395732 163939 32276 1311009 85506 962873 3206 1209137 854146 1107481 137572 616082 297029 530354 206924 312978 598061 394576 14977 393222 527537 131148 583586 399441 615340 400465 639872 4168 346420 667657 363040 1065354 65901...
result:
ok 1
Test #18:
score: 0
Accepted
time: 85ms
memory: 17920kb
input:
700
output:
Yes 365614 142145 87212 1606401 162844 361248 139422 561921 1204242 559273 1131860 432803 1057044 525857 1409026 532793 1230406 80049 1441858 30873 1213476 78482 968709 4274 1043212 4306 541229 1554576 17409 635398 16433 1094348 262178 563537 1205420 328273 539008 148488 70580 1450057 591776 1081354...
result:
ok 1
Test #19:
score: 0
Accepted
time: 117ms
memory: 19668kb
input:
800
output:
Yes 645614 1179649 389100 2097153 648476 2228768 889054 2125313 1736978 73961 2524436 67683 1757460 2105377 1934338 148025 2434182 166449 1840514 16921 1088868 589970 1100869 864946 1065292 669330 377133 2105424 1228929 2106118 1967281 58188 263330 104529 1328556 630865 284544 1056840 413748 1672969...
result:
ok 1
Test #20:
score: 0
Accepted
time: 168ms
memory: 23340kb
input:
900
output:
Yes 558192 1342340 2195480 677542 360529 1192238 526848 2221198 792673 1091350 594145 1084446 94752 1214917 803338 1226865 525830 1235112 65794 159485 524544 1390305 704518 12776 2247184 4096 412492 1574016 354419 2757376 1371333 2097680 976289 66142 1066016 131087 30928 3048229 72832 2671155 144640...
result:
ok 1
Test #21:
score: 0
Accepted
time: 194ms
memory: 26684kb
input:
1000
output:
Yes 998192 2098244 455064 66086 55697 2237998 334144 2261646 1077537 298582 676129 33502 1968416 2184709 1048650 2467377 1198150 635048 2229762 893437 2228224 533409 165894 3233448 295184 686080 1410444 2099776 300467 2845248 1343877 554064 3473441 177758 3424544 12815 1949712 2105893 4480 1109107 2...
result:
ok 1
Test #22:
score: 0
Accepted
time: 261ms
memory: 29572kb
input:
1200
output:
Yes 4518192 2295876 1619096 2116390 5157009 1048878 2335296 279694 3715873 4589654 1122337 4250846 2237216 4529157 1622090 2174513 917574 23976 1638914 2515197 4233472 2433697 16646 4628136 549136 2360320 4829324 393792 28083 2396224 1269893 297552 4935969 3408990 16928 4043791 149776 4490277 727168...
result:
ok 1
Test #23:
score: 0
Accepted
time: 414ms
memory: 33780kb
input:
1400
output:
Yes 1320820 2279427 4785292 2245219 531860 5709897 576896 393303 2713344 131211 4988960 2294402 290124 7438848 4254 5040640 2097661 4291074 33821 5196226 2101285 2035544 4198407 804656 243853 6046464 14497 3785806 4463121 770414 266881 3206250 4526977 2755640 4469507 771228 4470786 3294197 4721672 2...
result:
ok 1
Test #24:
score: -100
Runtime Error
input:
1600
output:
Yes