Show all threads Hide all threads Show all messages Hide all messages |
if a = 0 and b = 0?? | gooooooogol | 1420. Integer-Valued Complex Division | 11 Mar 2025 10:55 | 2 |
if a = 0 and b = 0 => r = 0 and q every complex number => count solation equation = infinity |
WA 14 ???? Help | Ostap Korkuna | 1420. Integer-Valued Complex Division | 3 Feb 2017 23:50 | 4 |
I can't understand what is wrong? Maby something with calculations and rounding??? Can anyone help me? Thanks [code deleted] Edited by moderator 22.02.2006 00:48 correst your x and y to: [code deleted] Edited by author 21.11.2005 04:45 Edited by moderator 22.02.2006 00:49 Can you tell me how to solve this problem?? Утверждение: задача эквивалентна следующей: нужно найти все комплексные q с целыми коэффициентами, удовлетворяющие |a-bq|<|b|. Если |b|=0, то решений нет Иначе |b|>0. Тогда условие эквивалентно |a/b - z|<1. Пусть a=a1+b1i, b=a2+b2i, q=q1+q2i. Тогда получим |alfa/gamma-q1+i(beta/gamma+q2)|<1 <=> ((alfa-gamma*q1)/gamma)^2+((beta+gamma*q2)/gamma)^2<1, где gamma=a2*a2+b2*b2, alfa=(a1*a2+b1*b2)/gamma, beta=i(a2*b1-a1*b2)/gamma. Теперь просто можно пройтись по всем q1 и q2 (они меняются от -1+alfa/gamma до 1+alfa/gamma и от -1-beta/gamma до 1-beta/gamma) и проверить условие. |
To ACers. | AlMag | 1420. Integer-Valued Complex Division | 17 Jan 2013 23:12 | 4 |
Can you generate me some tests with answers? I'd like to check my program. Put R+,Q+. Try this: 1000000 1000000 1000000 1000000 1 1000000 1000000 999999 1000000 3 1000000 0 1 1000000 2 I think that answer on the last test must be 3. (1+1000000i)*(-i)+i=1000000 (1+1000000i)*(1-i)-1-999999i=1000000 (1+1000000i)*0+1000000=1000000 Some random tests: 21 56 32 45 3 90 87 45 23 4 234 876 129 623 2 12345 65 8967 1345 3 4563 897 156 734 4 4 6 7 8 3 |
q and r real ? | Lifanov | 1420. Integer-Valued Complex Division | 24 Aug 2008 04:20 | 3 |
Or too complex ? What q,r for test in example ? All are complex! in example: q1=-2i r1=2 q2=-3i r2=-3 Complex, but with integer components |
Always wa6,is there somebody who knows some tests | Vukasin | 1420. Integer-Valued Complex Division | 25 Jun 2008 23:42 | 1 |
I always get wa6.Is there anybody who knows what that test is? Edited by author 25.06.2008 23:44 |
About WA4 | Kollekcioner[Vologda, VML1] | 1420. Integer-Valued Complex Division | 7 Jul 2007 22:48 | 1 |
About WA4 Kollekcioner[Vologda, VML1] 7 Jul 2007 22:48 If you have a WA4 you may take in account that q = 0+0i too is an answer. Though I don't understand why |
What mean |b| for complex | Dembel {AESC USU} | 1420. Integer-Valued Complex Division | 20 Oct 2006 21:12 | 2 |
what mean |b| for complex? for example: b=7+0i |b|=? b=7-2i |b|=? b=-2i |b|=? Edited by author 20.10.2006 19:00 b=x+y*i |b|=Sqrt(x*x+y*y) |
i did not understand this problem/ help me please | +FAMAS+ | 1420. Integer-Valued Complex Division | 8 Feb 2006 23:56 | 1 |
12 0 0 5 - what this and why answer = 2 |
Please help me! | Dzmitry | 1420. Integer-Valued Complex Division | 31 Dec 2005 19:30 | 1 |
Please, help me with this problem. At first, when I saw this problem, I thought that it's very easy, but then... My solution #1: [code deleted] But at test #6 time isn't enough. My solution #2: [code deleted] And test #6 again. Please, I can't find the error. Maybe does anybody know this test. Thanks for any information. Edited by moderator 22.02.2006 00:50 |
Brute Force can AC in 0.015sec | Yu Yuanming | 1420. Integer-Valued Complex Division | 24 Dec 2005 13:43 | 1 |
|