QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#473891 | #5090. 妙妙题 | yqh2025 | 52.759642 | 1704ms | 179068kb | C++14 | 888b | 2024-07-12 14:50:30 | 2024-07-12 14:50:33 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
const int N=70;
const double pi=acos(-1),eps=1e-10;
int n;
struct point{
double x,y;
}P[N];
double xj(point x,point y){return x.x*y.y-x.y*y.x;}
point operator +(point x,point y){return (point){x.x+y.x,x.y+y.y};}
point operator -(point x,point y){return (point){x.x-y.x,x.y-y.y};}
int sgn(double x){
if(x>eps)return 1;
if(x<-eps)return -1;
return 0;
}
void init(int N,bool type,int p){
n=N;double du=pi*2/n;
for(int i=0;i<n;i++){
P[i].x=cos(du*i),P[i].y=sin(du*i);
}
}
int a[N];
bool guess(ull A,int x){
for(int i=0;i<n-1;i++)a[i]=((A>>(1ull*i))&1ull);
point po=(point){0,0};
for(int i=0;i<n-1;i++){
if(a[i])po=po+P[i];
}
int ans=sgn(xj(P[n-1],po));
if(!sgn(po.x)&&!sgn(po.y))return 0;
if(ans==0)return 1;
if(ans>0)return 1;
return 0;
}
詳細信息
Test #1:
score: 1.35982
Acceptable Answer
time: 1095ms
memory: 141212kb
input:
47 1 512 65536 59357300018926 96293527518067 137737813750604 78491116915335 88993654874821 78360968852287 2702630495168 114190034399180 83706287931245 55843777475204 63987647760479 11819697729154 76479374308061 97575794268961 13640589330115 19983697841730 74715951846822 13599519328054 61548920225107...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #2:
score: 1.35982
Acceptable Answer
time: 1120ms
memory: 143424kb
input:
48 1 1 65536 258400084282002 18817291621552 34157414175968 261341895829058 57721360254810 38139952911729 53122991565876 214222729945708 39585781480156 48503996366320 134007771804549 248553732684813 247186913037501 110017143518730 113208754435931 131680128766130 195535268670747 147744476202390 276072...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #3:
score: 3.84615
Accepted
time: 0ms
memory: 6152kb
input:
3 0 1 8 0 1 2 3 4 5 6 7
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #4:
score: 3.84615
Accepted
time: 0ms
memory: 4144kb
input:
4 0 1 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #5:
score: 3.84615
Accepted
time: 0ms
memory: 4260kb
input:
5 0 1 32 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
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #6:
score: 3.84615
Accepted
time: 0ms
memory: 4116kb
input:
6 0 1 64 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
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #7:
score: 3.84615
Accepted
time: 0ms
memory: 4196kb
input:
7 0 1 128 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 ...
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #8:
score: 3.84615
Accepted
time: 1ms
memory: 4192kb
input:
8 0 1 256 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 ...
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #9:
score: 1.35982
Acceptable Answer
time: 1ms
memory: 4308kb
input:
9 0 1 512 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 ...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #10:
score: 3.84615
Accepted
time: 2ms
memory: 6268kb
input:
10 0 1 1024 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 9...
output:
JFIBEIIYTAFEUXOULOWO 1.000000
result:
ok Accepted!
Test #11:
score: 1.35982
Acceptable Answer
time: 3ms
memory: 4316kb
input:
11 0 1 2048 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 9...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #12:
score: 1.35982
Acceptable Answer
time: 6ms
memory: 5268kb
input:
12 0 1 4096 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 9...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #13:
score: 1.35982
Acceptable Answer
time: 6ms
memory: 8824kb
input:
13 0 1 8192 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 9...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #14:
score: 1.35982
Acceptable Answer
time: 27ms
memory: 11540kb
input:
14 0 1 16384 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 ...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #15:
score: 1.35982
Acceptable Answer
time: 58ms
memory: 18236kb
input:
15 0 1 32768 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 ...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #16:
score: 1.35982
Acceptable Answer
time: 126ms
memory: 34108kb
input:
16 0 1 65536 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 ...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #17:
score: 1.35982
Acceptable Answer
time: 439ms
memory: 85232kb
input:
28 0 4096 65536 12151528 151281107 6356985 55622754 60790524 53095221 162774027 194726956 201380075 180643942 225783870 139946880 218528657 225747273 45233416 69963165 110071370 18713620 44573845 197368669 192189960 141638483 205070195 74240494 192234058 55620586 106561140 236994814 168337406 215313...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #18:
score: 1.35982
Acceptable Answer
time: 470ms
memory: 87228kb
input:
29 0 512 65536 410980218 273986093 178466579 150072202 250912479 270586913 393616450 140036310 132749116 193167620 238207721 326701767 60326704 175391453 459652996 91592080 465308012 303071205 317027207 313954262 271839860 162796025 383149978 185842070 506111563 99795943 67286207 299755290 444249030...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #19:
score: 1.35982
Acceptable Answer
time: 504ms
memory: 89056kb
input:
30 0 64 65536 214691366 235660933 597567210 280356575 393308773 32061236 891978407 203580173 963799529 818831701 435986085 699779062 393711419 235031222 190999512 651187471 263424929 403655957 709360404 520961430 84146157 915935067 839531745 598427362 31351715 260657569 651872369 657176264 286669978...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #20:
score: 1.35982
Acceptable Answer
time: 523ms
memory: 93744kb
input:
31 0 1 65536 0 2147483647 1 2147483646 2 2147483645 4 2147483643 8 2147483639 16 2147483631 32 2147483615 64 2147483583 128 2147483519 256 2147483391 512 2147483135 1024 2147482623 2048 2147481599 4096 2147479551 8192 2147475455 16384 2147467263 32768 2147450879 65536 2147418111 131072 2147352575 26...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #21:
score: 1.35982
Acceptable Answer
time: 552ms
memory: 93384kb
input:
32 0 1 65536 0 4294967295 0 1431655765 2863311530 4294967295 0 286331153 572662306 858993459 1145324612 1431655765 1717986918 2004318071 2290649224 2576980377 2863311530 3149642683 3435973836 3722304989 4008636142 4294967295 0 16843009 33686018 50529027 67372036 84215045 101058054 117901063 13474407...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #22:
score: 1.35982
Acceptable Answer
time: 1619ms
memory: 172836kb
input:
60 0 4096 65536 323063836466945924 793208291393593433 189732482682253627 339930035043069470 789975177022429968 414130113627522972 91354260708955341 246387313915805097 970513132875638428 12986596413062042 625318425426451677 353996229352655370 207780311111953778 34041113763273101 354089840612182482 43...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #23:
score: 1.35982
Acceptable Answer
time: 1665ms
memory: 175840kb
input:
61 0 512 65536 1269579383276536574 695100626888423752 1516888087373291385 62428637511494860 2066149187156155714 2191875477617107915 1990208032576906010 904462045833512333 1432974211708032269 1282245156402897867 2096783067184239171 2075613347620236839 1250324067295528212 47976314605632040 59849885805...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #24:
score: 1.35982
Acceptable Answer
time: 1704ms
memory: 178476kb
input:
62 0 64 65536 3579036048363638035 1601308923709322678 3797465667647602123 766217468233066219 450676595845310450 1532660195163344938 1771678237392312816 1676569536181862657 2613010877472702833 494389864650935313 2858087890091928221 2143267956909629504 395591804550444159 510332675328606646 41204665032...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #25:
score: 1.35982
Acceptable Answer
time: 1519ms
memory: 175540kb
input:
63 0 1 65536 0 9223372036854775807 0 1317624576693539401 2635249153387078802 3952873730080618203 5270498306774157604 6588122883467697005 7905747460161236406 9223372036854775807 0 72624976668147841 145249953336295682 217874930004443523 290499906672591364 363124883340739205 435749860008887046 50837483...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!
Test #26:
score: 1.35982
Acceptable Answer
time: 1574ms
memory: 179068kb
input:
64 0 1 65536 0 18446744073709551615 0 6148914691236517205 12297829382473034410 18446744073709551615 0 1229782938247303441 2459565876494606882 3689348814741910323 4919131752989213764 6148914691236517205 7378697629483820646 8608480567731124087 9838263505978427528 11068046444225730969 12297829382473034...
output:
JFIBEIIYTAFEUXOULOWO 0.353553
result:
points 0.3535530 Partially Correct!