Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Hint and Solution | AleshinAndrei | 1562. Ананас | 26 авг 2020 19:26 | 1 |
It's very easy to calculate this integral. But if you don't know what's integral, there are solution In-first, i calculated a k k = (a^2 * b * pi / 8) (or a*a*b*0.39269908169872415480783042290994 :) ) In-second, you should calculate y (or other symbol) from 1 to -1 with division (if n = 5: 1, 3/5, 1/5, -1/5, -3/5, -1) In-third, calculate F(y) = y*(1 - y^2 / 3). (F(1) = 2/3) in-fourth, print k*(F(yi) - F(y(i-1))) in loop example: if n = 2: first calculate should be k*(F(1) - F(0)), second k*(F(0) - F(-1)) if n = 3: 1) k*(F(1) - F(1/3)); 2) k*(F(1/3) - F(-1/3)); 3) k*(F(-1/3) - F(1)) etc. |
Ellipsoidal cap | die_young | 1562. Ананас | 11 июл 2018 19:54 | 1 |
Search for "Ellipsoidal cap volume" on the internet if you got stuck with this problem. You can find derivation of a formula needed for this problem. |
Hint test 9 | Cebotari Vladislav | 1562. Ананас | 30 дек 2016 14:59 | 1 |
I had a program like that: while (x <= b/2) { .... x += dx } but it will fail test 1 1 100 (the last piece won't show). Changed to while (x <= b/2 + 0.000001) { .... x += dx } Got AC! |
TEST 11 | George | 1562. Ананас | 31 янв 2016 11:52 | 1 |
Please give me test 11!!!=( |
Some tests | Felix_Mate | 1562. Ананас | 19 авг 2015 19:45 | 1 |
1) 14 14 5 => 149.422524 356.315250 425.279492 356.315250 149.422524 2) 66.001 99.9 2 => 113929.225834 113929.225834 3) 0.45 6.666 10 => 0.019790 0.053716 0.079160 0.096123 0.104605 0.104605 0.096123 0.079160 0.053716 0.019790 4) 1 1 1 => 0.523599
|
Solution | adamant | 1562. Ананас | 6 окт 2014 02:00 | 4 |
I really don't understand, why should I divide the answer by 8?.. UPD: Nevermind, got it. Edited by author 02.05.2014 17:23 In problem you are given full axis and if you don't want divide answer by 8, you must divide given a and b by 2 before counting integral Edited by author 06.10.2014 02:02 Edited by author 06.10.2014 02:02 BinaryMind, no, it's because your a and b is full lenght and width of ellipse, but you need half of a and half of b. |
How can I show numbers after dot? Which function I have to use? | Lareon | 1562. Ананас | 14 мар 2014 00:07 | 3 |
printf("%0.6f", number) in c/c++ or writeln(number:0:6) in pascal p.s. checkout the other online training/judge website www.z-trening.com, it has more feedback when you submit a problem Note that scanf uses "%lf" to read double, but printf must use "%f". It looks like printf with "%lf" does not work on Windows, although it works on Linux. |
Странности какие | Zelch | 1562. Ананас | 13 окт 2013 21:56 | 1 |
я пробовал интегрировать и аналитически и численно, выдает то что должен выдавать в примере, но вот AC так и нет |
WA1 | IgorKoval(from Pskov) | 1562. Ананас | 19 сен 2011 16:32 | 1 |
WA1 IgorKoval(from Pskov) 19 сен 2011 16:32 if on simple test your answer is 141.82419374396696000000 373.90014714318562000000 528.61744940933136000000 605.97610054240431000000 605.97610054240431000000 528.61744940933136000000 373.90014714318562000000 141.82419374396696000000 just swap(a,b) and read carefully problem; =) |
WA # 9! Please give me some tests!!! | Enigma [UB of TUIT] | 1562. Ананас | 14 сен 2011 17:06 | 3 |
This is my code... import java.util.Scanner; public class T_1562 { public static double a,b; public static void main(String[] args) { Scanner sc= new Scanner(System.in); a = sc.nextDouble(); b = sc.nextDouble(); b = b/2; a = a/2; int n = sc.nextInt(); double step = 2*b/n; double x = -b; while(x+step <= b){ System.out.printf("%.6f",Math.abs(F(x)-F(x+step))); System.out.println(); x = x+step; } } private static double F(double z){ return Math.PI*(a/b)*(a/b)*(b*b*z - z*z*z/3); } } Edited by author 12.09.2011 14:14 |
Test 14 | Anna Gandilyan | 1562. Ананас | 24 июл 2009 00:09 | 2 |
Test 14 Anna Gandilyan 6 фев 2008 20:12 Can somebody tell me what is 14th test, please????? I also had WA 14, I just added some digits into PI |
test WA11 | Zhasulan | 1562. Ананас | 21 мар 2009 13:09 | 2 |
can you help me, please give me test11 use something like that: Step := B/N; Z := -B/2; while 1e-6 < B/2 - Z do begin WriteLn(Volume(Z, Z+Step):0:6); Z := Z + Step; end; |
very difficult! | St. Medved Command (Mezin & Taran) | 1562. Ананас | 19 окт 2007 16:54 | 2 |
Maybe, i must to find V of ellipsoid! how ti find that? and the sector of ellipsoid!!! Integration will help you. |
test 9 | Marcin Witkowski | 1562. Ананас | 7 окт 2007 19:18 | 1 |
test 9 Marcin Witkowski 7 окт 2007 19:18 what is test 9 different from previous eights ? could it be some number conversion error ? |