Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Realy strange problem (SPOILER) | andreyDagger`~ | 1360. Философский спор | 28 июл 2022 20:32 | 1 |
Bruteforcing in range [0, 4e7] gives WA9, bruteforcing in range [1e8-4e7,1e8] gives AC Edited by author 28.07.2022 20:34 |
What is wrong??? | Mosca Felice | 1360. Философский спор | 9 янв 2015 18:43 | 1 |
read(x,y); readln(e); t:=0; if ((abs (x-sin(sqrt(t)))<=e) and (abs(y-cos(t))<=e)) then begin write('0') ; exit; end; f1:=true; f2:=true; repeat t:=t+e until (abs(sin(sqrt(t))-x)<=e) and (abs(cos(t)-y)<=e) or (t>10e12) ; if t>10e12 then write ('FAIL') else write(t:0:1); |
A good problem for real philosophers. | Yaroslavtsev Grigory (SpbSPU) | 1360. Философский спор | 9 янв 2015 18:35 | 7 |
Nothing special to get AC, just think a little and write about 20 strings of code. Look what happens when T becomes large. !!!!!!!!!!!!!!!!!!!!!!!!! What interval at you for T? And what step of increase? ?????????????????????????? search(+) little hint repeat t:=t+0.001; until cos(t)-y<0.00001; Where is mistake? read(x,y); readln(e); t:=0; if ((abs (x-sin(sqrt(t)))<=e) and (abs(y-cos(t))<=e)) then begin write('0') ; exit; end; repeat t:=t+e until (abs(sin(sqrt(t))-x)<=e) and (abs(cos(t)-y)<=e) or (t>10e12) ; if t>10e12 then write ('FAIL') else write(t:0:1); |
WA5 | kilik | 1360. Философский спор | 29 янв 2014 18:34 | 2 |
WA5 kilik 7 дек 2013 01:52 #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { double t = 0; double eps; double x, y; cin>>x>>y>>eps; eps=eps*0.001; while(1) { double c = cos(t) - y; double d = sin(sqrt(t)) - x ; if( c*c+d*d > eps/2) t+=0.007; else { break; } } cout<<fixed<<setprecision(5)<<t; return 0; } Can someone tell what is wrong or give some tests?(my mail kilik94@yandex.ru) Thanks in advance! Edited by author 07.12.2013 01:58 Why "> eps/2" ? May be "> eps**2"? |
This is an awful problem! I hate it! | Aram Shatakhtsyan | 1360. Философский спор | 28 янв 2014 02:39 | 2 |
Yup, I have implemented gradient descent with time cheking only to find it fail on tests 4,5 and then (after some constants manipulations) on test 9, and then just read a forum reply and implemented that "dumb" solution. Edited by author 28.01.2014 02:39 |
What the...? | ONU_1785 | 1360. Философский спор | 23 май 2012 03:07 | 1 |
*finding double t, such that |sin(t^1/2)-x|<eps and |cos(t)-y|<eps* cout<<t; - WA #7 cout<<fixed<<setprecision(5)<<t; - AC. Why? |
WA on Test 4 | Armen Tsirunyan | 1360. Философский спор | 22 ноя 2009 21:41 | 3 |
Hi, everyone. I hate this problem, too, but there's a strange thing going on with test 4. My algorithm is very straightforward and it cannot possibly lead to a WA. It could be a TLE, I admit, but can anybody explain to me HOW is WA possible with this code? #include <iostream> #include <cmath> using namespace std; int main() { double t = 0; double eps; double x, y; cin>>x>>y>>eps;
eps*=eps; t = 0; while(true) { double c = cos(t) - y; double d = sin(pow(t,0.5)) - x ; if( c*c+d*d > eps/2) t+=0.007; else { break; } } cout<<t; return 0; } OK, I got AC. And I found my mistake. And inasmuch as I do hate this problem, and don't think this is a good problem, I want to tell everybody how to solve it. So, first of all, output the answer with precision 10^-5; Second of all, find the smallest positive t, such that cos(t) = y; Then while(sin(sqrt(t)) !~ x) t+=2pi. That's all. Good luck with this goddamn(this isn't a taboo word, is it?:)) problrm Thank you for your advice! Whith it I got AC without any WA!:) |
precision | Slam [Tartu U] | 1360. Философский спор | 29 дек 2006 04:12 | 4 |
I can't understand what precision is needed for answer? According to sample test it is 0.1.. but I think my solution should work, but it's getting WA.. "The second line contains ε ≥ 0.0001 — the radius of the dot (the dot is essentially a small circle)." So precision should be 1e-4 thanks, but I still can't understand why it can't be more than needed..:-) |
Mistake | Sandro | 1360. Философский спор | 4 сен 2005 16:49 | 9 |
"How is it going to ll the entire square" Correct must be "How is it going to fill the entire square" Check the other problems of IX Ural Championship, please. There are some mistakes in texts too. 1360: "but still you can ll a square with a line in such a way that there will be no gaps" fill 1362: "Like any other rm that oers high salaries for students" firm, offers 1363: "He will deal with any incorrectly congured program" configured 1363: "and his buddies are preparing a really cool persent for him " present 1363: "Ivan's friends have discovered that a tambourine only becomes eective" effective 1363: "a le containing the grayscale photo of Ivan" file 1363: "Ivan's photo consists of dierent" different 1364: "in order to nd the treasures hidden in the graves" find 1364: "And she is going to nd another one soon" find 1364: "You should'n not revive unnecessary skeletons" should not 1364: "at the moment the allseeingeye located her" all-seeing-eye 1365: "went to celebrate results of the rst round" first 1365: "what this module is indended for" intended 1365: "Arithmetic operations are written in prex form" prefix 1366: "chief information ocer" ??? 1366: "you are to nd out the amount" find 1369: "to make the maximum prot out of their enterprise" profit 1362 "ACM has a clearly dened hierarchical structure." defined Fixed. (-) Vladimir Yakovlev (USU) 4 сен 2005 16:49 Fixed. Vladimir Yakovlev (USU) 28 апр 2005 00:21 |
WA test #9 | Evil Cheater | 1360. Философский спор | 8 июл 2005 03:44 | 3 |
Hi! I keep getting WA in test 9. Here's what I'm doing: 1.- solve for t in y = cos(t) 2.- if the solution is negative, adjust it. 3.- while that t doesn't make x = sin(sqrt(t)), find the next solution. 4.- if (t<10^12) then print solution else print "FAIL". For checking if x = sin(sqt(t)) I use (abs(sin(sqrt(t))-x)>e). Would it be better to solve t for x = sin(sqrt(t)) and then check y = cos(t)? Is it posible to get "FAIL" as an answer? Any sugestions? Thanks!
Edited by author 01.07.2005 00:09 Thanks! About my algorithm? Is it wrong or is it just badly implemented? |
2Admins Please, fix this problem!!! | wwwwww | 1360. Философский спор | 10 май 2005 13:09 | 3 |
I submited these 8 bytes of code: main(){} and I've got AC... I think it's abnormal answer :) |