QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#178142 | #7242. Mr.~Credo | PhantomThreshold# | WA | 35ms | 15692kb | C++20 | 969b | 2023-09-13 18:33:28 | 2023-09-13 18:33:28 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define int long long
using namespace std;
const int maxn = 2050000;
typedef long double db;
const int inf = 1e9;
db pi= acos(-1);
int n;
int flag[maxn];
signed main()
{
ios_base::sync_with_stdio(false); ////////////////////////////////////////
cin.tie(0);
cin>>n;
for(int i=1;i<=n;i++)
{
int x,y,phi,ai;
cin>>x>>y>>phi>>ai;
int u=ai, v=ai+phi+1;
flag[u]++;
if(v<=1296000) flag[v]--;
else
{
flag[0]++;
flag[v-1296000]--;
}
}
int ansp;
for(int i=0;i<1296000;i++)
{
flag[i]+=flag[i-1];
if(!flag[i])
{
ansp=i;
break;
}
}
db arc= 2*pi/1296000*ansp;
db cx=cos(arc),cy=sin(arc);
int k=1;
int ansx,ansy;
while(1)
{
int x= k*cx, y=k*cy;
if( x>-inf && x<inf && y>-inf && y<inf )
{
ansx=x,ansy=y;
k<<=1;
}
else break;
}
cout<<"YES\n";
cout<<ansx<<' '<<ansy<<endl;
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 3ms
memory: 14548kb
input:
4 1 2 486000 0 -1 1 324000 648000 1 0 108000 0 1 0 108000 1188000
output:
YES -759253805 759246444
result:
ok Seems ok, min distance to light = 5207.13
Test #2:
score: 0
Accepted
time: 2ms
memory: 11864kb
input:
10 0 0 149605 640182 0 0 51924 760110 0 0 14531 370974 0 0 82864 1009818 0 0 13668 877773 0 0 27523 945102 0 0 216723 246382 0 0 268334 861058 0 0 142890 328031 0 0 223562 461949
output:
YES 536870912 0
result:
ok Seems ok, min distance to light = 3.88011e+08
Test #3:
score: 0
Accepted
time: 0ms
memory: 14276kb
input:
10 32 -15 514796 11109 30 -12 181791 391320 -43 31 21111 151392 -43 -41 47933 1199789 48 37 57302 1953 6 -15 91381 1253012 -12 10 83332 988560 -35 3 144973 329169 -25 47 23208 576618 12 6 119845 830237
output:
YES -501873318 190666064
result:
ok Seems ok, min distance to light = 2602.07
Test #4:
score: 0
Accepted
time: 2ms
memory: 14472kb
input:
1000 -42 -41 1519 408937 -46 -24 2555 593045 43 46 822 1232688 14 -7 3307 959831 13 -15 2243 772622 -31 -30 868 1253536 -39 34 1186 1132434 -48 28 2440 726251 11 42 1926 66244 -42 -1 496 403545 33 -13 1370 989716 37 -13 702 574659 -4 -2 1178 451587 21 2 1120 780670 47 -21 1116 359312 44 16 661 84503...
output:
YES 536752730 11264194
result:
ok Seems ok, min distance to light = 2555.84
Test #5:
score: 0
Accepted
time: 2ms
memory: 13868kb
input:
1000 -50 -50 71 988471 -50 -50 1409 24845 -50 -50 4819 1002410 -50 -50 1813 948264 -50 -50 2115 246438 -50 -50 3343 1062325 -50 -50 778 148705 -50 -50 2647 227847 -50 -50 4273 1152881 -50 -50 1106 535163 -50 -50 6752 716076 -50 -50 2082 435202 -50 -50 773 924896 -50 -50 1405 691180 -50 -50 31 914741...
output:
YES 536774751 10160816
result:
ok Seems ok, min distance to light = 2651.11
Test #6:
score: 0
Accepted
time: 0ms
memory: 14084kb
input:
1000 -50 50 1845 843423 -50 50 1513 686146 -50 50 664 812637 -50 50 961 316888 -50 50 869 960618 -50 50 649 241734 -50 50 1489 553298 -50 50 2024 732709 -50 50 2784 1259060 -50 50 1776 178551 -50 50 443 1269235 -50 50 690 1273322 -50 50 2344 1050015 -50 50 1624 365804 -50 50 1396 102691 -50 50 1317 ...
output:
YES 536781666 9788677
result:
ok Seems ok, min distance to light = 2551.69
Test #7:
score: 0
Accepted
time: 1ms
memory: 13932kb
input:
1000 50 -50 1265 435875 50 -50 74 879720 50 -50 800 522117 50 -50 2205 664007 50 -50 441 465824 50 -50 4759 806686 50 -50 2399 670123 50 -50 303 239438 50 -50 92 992612 50 -50 502 802059 50 -50 575 117817 50 -50 1100 1073963 50 -50 1182 1091000 50 -50 736 790830 50 -50 259 381753 50 -50 1134 725902 ...
output:
YES 536862567 2993231
result:
ok Seems ok, min distance to light = 2652.44
Test #8:
score: 0
Accepted
time: 2ms
memory: 14328kb
input:
1000 50 50 106 777933 50 50 885 651836 50 50 2428 590306 50 50 49 577830 50 50 1801 616205 50 50 3569 1288674 50 50 485 556828 50 50 1488 976556 50 50 938 722111 50 50 90 1238035 50 50 404 1112564 50 50 949 833280 50 50 1625 776501 50 50 3783 1000838 50 50 583 422369 50 50 198 851692 50 50 707 64701...
output:
YES 536458841 21030638
result:
ok Seems ok, min distance to light = 2554.53
Test #9:
score: 0
Accepted
time: 33ms
memory: 13840kb
input:
200000 -50 -50 5 729777 -50 -50 12 1037645 -50 -50 6 63629 -50 -50 6 634579 -50 -50 8 857888 -50 -50 2 89375 -50 -50 1 487806 -50 -50 5 32503 -50 -50 1 360472 -50 -50 2 569137 -50 -50 4 1160177 -50 -50 5 447120 -50 -50 1 288800 -50 -50 2 434012 -50 -50 4 424711 -50 -50 4 193728 -50 -50 16 533586 -50...
output:
YES 536870911 15616
result:
ok Seems ok, min distance to light = 2651.88
Test #10:
score: 0
Accepted
time: 30ms
memory: 15692kb
input:
200000 -50 50 33 983490 -50 50 3 1176442 -50 50 11 479216 -50 50 3 261549 -50 50 2 580041 -50 50 3 1016347 -50 50 5 387414 -50 50 2 448346 -50 50 9 924768 -50 50 6 942162 -50 50 5 419815 -50 50 5 1185628 -50 50 9 841571 -50 50 13 349468 -50 50 19 1295930 -50 50 3 1248156 -50 50 21 1105026 -50 50 9 8...
output:
YES 536870912 0
result:
ok Seems ok, min distance to light = 2652.82
Test #11:
score: 0
Accepted
time: 26ms
memory: 14008kb
input:
200000 50 -50 4 196259 50 -50 7 1241013 50 -50 7 603689 50 -50 1 136006 50 -50 2 1288951 50 -50 5 253768 50 -50 6 654339 50 -50 10 1047380 50 -50 3 995187 50 -50 1 1215818 50 -50 5 582805 50 -50 3 164454 50 -50 6 332956 50 -50 1 714017 50 -50 9 929948 50 -50 7 1113675 50 -50 2 714311 50 -50 13 11718...
output:
YES 536870893 140552
result:
ok Seems ok, min distance to light = 2553.28
Test #12:
score: 0
Accepted
time: 35ms
memory: 15456kb
input:
200000 50 50 4 1005133 50 50 2 371518 50 50 9 1124486 50 50 2 321516 50 50 2 515862 50 50 4 1256126 50 50 2 1188003 50 50 7 391557 50 50 8 470340 50 50 7 1091710 50 50 12 332991 50 50 2 958630 50 50 7 189058 50 50 6 1143386 50 50 4 1194464 50 50 3 729651 50 50 13 409485 50 50 2 72481 50 50 5 1249372...
output:
YES 536870911 15616
result:
ok Seems ok, min distance to light = 2551.88
Test #13:
score: 0
Accepted
time: 7ms
memory: 14040kb
input:
50000 -50 -50 2 312468 -50 -50 16 295096 -50 -50 36 167426 -50 -50 20 1289078 -50 -50 18 656477 -50 -50 28 1230594 -50 -50 12 1223055 -50 -50 4 334474 -50 -50 17 28807 -50 -50 52 399068 -50 -50 36 328491 -50 -50 48 1011738 -50 -50 27 609551 -50 -50 64 693818 -50 -50 9 1053456 -50 -50 39 918111 -50 -...
output:
YES 536870912 0
result:
ok Seems ok, min distance to light = 50
Test #14:
score: -100
Wrong Answer
time: 8ms
memory: 14784kb
input:
50000 -50 50 3 462861 -50 50 67 389447 -50 50 28 1128218 -50 50 3 131008 -50 50 17 735770 -50 50 11 1120046 -50 50 34 509584 -50 50 25 773108 -50 50 28 603520 -50 50 23 869338 -50 50 13 1252980 -50 50 37 760023 -50 50 21 1254756 -50 50 52 84866 -50 50 30 905462 -50 50 79 79412 -50 50 30 439941 -50 5...
output:
YES 536870912 0
result:
wrong answer The circle is partially or fully lit by a 41895-th spotlight