QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#99983 | #4923. 整数 | lingchen | 1.805833 | 111ms | 4100kb | C++14 | 1.6kb | 2023-04-24 11:53:12 | 2023-04-24 11:53:16 |
Judging History
answer
// 5pts
#include "integer.h"
#include <bits/stdc++.h>
using namespace std;
int p[5100];
namespace Sub1 {
void work(int n)
{
for(int i=0; i<n; i++) operate(i);
for(int i=0; i<n; i++)
{
p[i]=operate(i)-__builtin_popcount(i+1);
for(int j=1; j<1<<(n-p[i]); j++) operate(i);
}
}
}
namespace Sub2 {
void work(int n)
{
for(int i=0; i<n; i++) operate(i);
p[0]=0;
for(int i=1; i<n; i++)
{
p[i]=operate(i)-__builtin_popcount(i);
for(int j=0; j<n; j++) if(j!=i) operate(j);
operate(0);
}
}
}
namespace Sub3 {
void work(int n)
{
int p0;
memset(p, -1, sizeof(p));
for(int i=0; i<n; i++) operate(i);
for(int i=0,t=0; i<n; i++)
if(p[i]==-1)
{
int now=operate(i);
p[i]=now-__builtin_popcount(++t);
if(p[i]==0) p0=i;
for(int j=0,tt=t; j<n; j++)
if(j!=i)
{
int val=operate(j);
if(val!=now+1)
{
if(p[j]==-1)
p[j]=val-tt;
if(p[j]==0) p0=j;
}
now=val; ++tt;
}
operate(p0);
}
}
}
vector<int> findPermutation (int n)
{
Sub3::work(n);
// if(n<=10) Sub1::work(n);
// else Sub2::work(n);
vector<int> ans;
for(int i=0; i<n; i++) ans.push_back(p[i]);
return ans;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 5
Accepted
time: 1ms
memory: 3636kb
input:
1 0
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 3 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 3 operation(s): scoring 1.000
Test #2:
score: 5
Accepted
time: 2ms
memory: 3700kb
input:
3 0 2 1
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 15 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 15 operation(s): scoring 1.000
Test #3:
score: 5
Accepted
time: 0ms
memory: 3668kb
input:
3 0 2 1
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 15 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 15 operation(s): scoring 1.000
Test #4:
score: 5
Accepted
time: 2ms
memory: 3756kb
input:
10 0 2 8 9 1 5 6 3 4 7
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 120 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 120 operation(s): scoring 1.000
Test #5:
score: 0
Wrong Answer
time: 2ms
memory: 3580kb
input:
10 1 8 3 2 6 0 7 9 5 4
output:
68F82AC1898AF4BFACDCBB49543233A61773093A WA Invalid query: Operation on 32666 violates range [0,9]
result:
wrong answer Invalid query: Operation on 32666 violates range [0,9]
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 1.80583
Acceptable Answer
Test #84:
score: 1.80583
Acceptable Answer
time: 104ms
memory: 4088kb
input:
5000 0 4022 1149 1576 2995 1809 3803 4188 1400 1251 4042 2830 766 4811 1622 4002 4474 1003 1152 130 4794 1902 1292 968 4673 3459 1795 3812 531 2335 1660 4968 3632 4047 353 4448 2515 1581 4259 1389 3628 3760 1381 2527 2353 4323 2807 386 1731 1973 1209 1982 232 747 2904 897 4375 2921 3384 457 1050 936...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 25010000 operation(s): scoring 0.181 0.1805832608
result:
points 0.18058326080 Passed using 25010000 operation(s): scoring 0.181
Test #85:
score: 1.80583
Acceptable Answer
time: 108ms
memory: 3832kb
input:
5000 0 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 1...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 25010000 operation(s): scoring 0.181 0.1805832608
result:
points 0.18058326080 Passed using 25010000 operation(s): scoring 0.181
Test #86:
score: 1.80583
Acceptable Answer
time: 111ms
memory: 3912kb
input:
5000 0 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 494...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 25010000 operation(s): scoring 0.181 0.1805832608
result:
points 0.18058326080 Passed using 25010000 operation(s): scoring 0.181
Test #87:
score: 1.80583
Acceptable Answer
time: 108ms
memory: 4088kb
input:
5000 0 206 472 204 527 84 134 30 801 61 100 138 695 340 228 259 31 157 218 266 352 231 500 80 362 99 189 77 168 344 475 223 111 626 161 282 96 368 434 91 165 230 479 621 215 269 37 116 433 425 166 182 505 22 553 40 526 14 125 65 17 524 58 252 57 673 90 508 365 42 88 72 25 565 609 150 651 200 86 546 ...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 25010000 operation(s): scoring 0.181 0.1805832608
result:
points 0.18058326080 Passed using 25010000 operation(s): scoring 0.181
Test #88:
score: 1.80583
Acceptable Answer
time: 108ms
memory: 3840kb
input:
5000 0 1918 435 1484 391 600 3475 951 1459 2753 516 1512 1121 1064 893 1355 1675 114 909 550 566 548 1081 933 157 78 789 264 230 1010 61 57 514 1016 118 964 925 1199 915 226 1019 505 408 997 773 547 35 1229 286 3645 1876 1210 487 1209 182 1424 859 611 1138 1038 719 532 546 2514 1607 1230 1296 2271 7...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 25010000 operation(s): scoring 0.181 0.1805832608
result:
points 0.18058326080 Passed using 25010000 operation(s): scoring 0.181
Test #89:
score: 1.80583
Acceptable Answer
time: 107ms
memory: 4100kb
input:
5000 0 2684 3226 1101 1223 1375 2678 800 656 582 494 3141 326 4523 2100 301 2233 1802 2722 748 4318 3192 842 2049 185 1882 779 925 725 3950 4766 3570 3964 2297 4513 1147 4732 889 3925 4508 1066 4444 3340 3216 2739 3806 2457 2903 4350 2376 1595 4257 3921 4618 3573 1564 1825 4770 1010 2662 214 961 709...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 25010000 operation(s): scoring 0.181 0.1805832608
result:
points 0.18058326080 Passed using 25010000 operation(s): scoring 0.181
Test #90:
score: 7.9206
Acceptable Answer
time: 6ms
memory: 3716kb
input:
1004 0 94 823 206 67 75 150 792 825 803 790 176 433 457 147 362 622 266 445 467 596 251 530 778 122 582 2 992 789 409 946 555 834 47 11 488 30 570 830 366 874 828 452 900 766 371 620 141 98 334 262 952 279 311 9 172 363 795 203 401 257 137 181 323 48 642 886 244 458 945 890 866 66 249 835 722 551 94...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 1010024 operation(s): scoring 0.792 0.7920603867
result:
points 0.79206038670 Passed using 1010024 operation(s): scoring 0.792
Test #91:
score: 3.39447
Acceptable Answer
time: 19ms
memory: 3780kb
input:
2003 0 1419 488 1442 1638 1036 121 530 1101 158 1622 1743 852 1556 739 1201 545 1969 1753 1140 1230 1923 1382 1792 1258 1967 1495 538 1244 644 1680 1811 464 1388 877 1355 911 1675 759 624 341 1100 796 1886 1568 1487 1236 605 1316 1337 315 689 1922 1227 1120 435 1260 1213 1152 1905 956 925 1542 1064 ...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 4016015 operation(s): scoring 0.339 0.3394469339
result:
points 0.33944693390 Passed using 4016015 operation(s): scoring 0.339
Test #92:
score: 2.69184
Acceptable Answer
time: 36ms
memory: 3928kb
input:
3002 0 167 2914 131 2383 2275 1603 2009 2637 2085 1605 215 1119 1032 1352 799 2681 2622 1876 1400 202 931 2996 800 1958 108 263 2490 1812 2940 1860 508 286 1042 299 2581 1223 594 2414 2256 1120 1604 1833 2967 572 2807 1554 1048 1151 350 1830 2593 823 2582 1600 409 1382 2276 1698 281 1863 1208 1894 2...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 9018008 operation(s): scoring 0.269 0.2691838759
result:
points 0.26918387590 Passed using 9018008 operation(s): scoring 0.269
Test #93:
score: 2.19295
Acceptable Answer
time: 69ms
memory: 3816kb
input:
4001 0 3751 2983 1519 958 3118 2231 3295 1730 1660 264 3509 3252 2342 3573 977 422 642 1551 2058 1177 1704 1502 516 1685 244 2752 1789 119 1274 509 1316 1569 2621 3083 974 1895 1865 1057 1015 779 1082 3915 3889 124 160 2433 338 3048 1295 592 708 1665 2895 3806 3868 3183 2357 3390 1449 1811 1448 3578...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 16016003 operation(s): scoring 0.219 0.2192951708
result:
points 0.21929517080 Passed using 16016003 operation(s): scoring 0.219
Test #94:
score: 10
Accepted
time: 2ms
memory: 3708kb
input:
10 0 3 2 1 5 4 6 9 8 7
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 120 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 120 operation(s): scoring 1.000
Test #95:
score: 10
Accepted
time: 2ms
memory: 3656kb
input:
10 0 8 1 3 6 9 5 2 4 7
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 120 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 120 operation(s): scoring 1.000
Test #96:
score: 10
Accepted
time: 2ms
memory: 3660kb
input:
10 0 8 4 9 6 2 1 5 3 7
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 120 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 120 operation(s): scoring 1.000
Test #97:
score: 10
Accepted
time: 2ms
memory: 3668kb
input:
70 0 35 22 19 46 16 44 39 21 40 34 20 24 56 60 61 5 43 38 4 25 13 41 54 7 29 42 65 8 12 55 52 11 18 67 50 36 10 49 59 51 1 9 62 23 33 37 69 3 45 66 28 30 58 17 31 64 48 26 27 47 57 53 68 2 6 32 63 14 15
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 5040 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 5040 operation(s): scoring 1.000
Test #98:
score: 9.85464
Acceptable Answer
time: 5ms
memory: 3592kb
input:
900 0 899 898 897 896 895 894 893 892 891 890 889 888 887 886 885 884 883 882 881 880 879 878 877 876 875 874 873 872 871 870 869 868 867 866 865 864 863 862 861 860 859 858 857 856 855 854 853 852 851 850 849 848 847 846 845 844 843 842 841 840 839 838 837 836 835 834 833 832 831 830 829 828 827 82...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 811800 operation(s): scoring 0.985 0.9854644001
result:
points 0.98546440010 Passed using 811800 operation(s): scoring 0.985
Test #99:
score: 10
Accepted
time: 2ms
memory: 3832kb
input:
1 0
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 3 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 3 operation(s): scoring 1.000
Test #100:
score: 10
Accepted
time: 0ms
memory: 3600kb
input:
2 0 1
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 8 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 8 operation(s): scoring 1.000
Test #101:
score: 10
Accepted
time: 2ms
memory: 3704kb
input:
3 0 1 2
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 15 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 15 operation(s): scoring 1.000
Test #102:
score: 10
Accepted
time: 2ms
memory: 3640kb
input:
4 0 3 2 1
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 24 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 24 operation(s): scoring 1.000
Test #103:
score: 10
Accepted
time: 2ms
memory: 3660kb
input:
5 0 1 2 3 4
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 35 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 35 operation(s): scoring 1.000
Test #104:
score: 10
Accepted
time: 2ms
memory: 3580kb
input:
10 0 1 2 3 4 5 6 7 8 9
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 120 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 120 operation(s): scoring 1.000
Test #105:
score: 10
Accepted
time: 0ms
memory: 3668kb
input:
49 0 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
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 2499 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 2499 operation(s): scoring 1.000
Test #106:
score: 10
Accepted
time: 2ms
memory: 3604kb
input:
123 0 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 10...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 15375 operation(s): scoring 1.000 1.0000000000
result:
ok Passed using 15375 operation(s): scoring 1.000
Test #107:
score: 1.80861
Acceptable Answer
time: 103ms
memory: 3960kb
input:
4992 0 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 1...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 24930048 operation(s): scoring 0.181 0.1808613762
result:
points 0.18086137620 Passed using 24930048 operation(s): scoring 0.181
Test #108:
score: 1.80618
Acceptable Answer
time: 103ms
memory: 3912kb
input:
4999 0 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 1...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 24999999 operation(s): scoring 0.181 0.1806180009
result:
points 0.18061800090 Passed using 24999999 operation(s): scoring 0.181
Test #109:
score: 1.83067
Acceptable Answer
time: 100ms
memory: 4072kb
input:
4929 0 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 1...
output:
68F82AC1898AF4BFACDCBB49543233A61773093A OK Passed using 24304899 operation(s): scoring 0.183 0.1830672350
result:
points 0.1830672350 Passed using 24304899 operation(s): scoring 0.183
Subtask #5:
score: 0
Skipped
Dependency #3:
0%