Search found 16 matches
- Mon Jun 02, 2008 3:11 pm
- Forum: Algorithms
- Topic: An interesting Vector Math Problem
- Replies: 2
- Views: 1511
Re: An interesting Vector Math Problem
n canbe very large. For now, you can asume n <= 1000. Note that, for the same problem in 2D, I can think of a solution in O(n). Just take the vector summation of b1, b2 .. bn where bi is the perpendicular normal vector to ai having the same length as ai.
- Sun Jun 01, 2008 10:12 pm
- Forum: Algorithms
- Topic: An interesting Vector Math Problem
- Replies: 2
- Views: 1511
An interesting Vector Math Problem
You are given n vectors in 3D: a1, a2 ... an. The task is to find a unit vector d, for which the value of following expression is maximum:
|a1 x d| + |a2 x d| + ... + |an x d|.
Here,
1. all the vectors are in 3 dimension.
2. d is a unit vector.
3. a1 x d means the cross product of a1 and d.
4. |a1 ...
|a1 x d| + |a2 x d| + ... + |an x d|.
Here,
1. all the vectors are in 3 dimension.
2. d is a unit vector.
3. a1 x d means the cross product of a1 and d.
4. |a1 ...
- Tue Nov 09, 2004 11:38 am
- Forum: Volume 107 (10700-10799)
- Topic: 10747 - Maximum Subsequence
- Replies: 15
- Views: 12289
Changed solution
<^7,
Hi,
I changed my algorithm since I could not make out how to handle special cases with that algo. The previous one (sort by abs value) was replaced by another one (trying to take big positive numbers, then even number of negetive numbers, finally special checks etc)
for special test case, u ...
Hi,
I changed my algorithm since I could not make out how to handle special cases with that algo. The previous one (sort by abs value) was replaced by another one (trying to take big positive numbers, then even number of negetive numbers, finally special checks etc)
for special test case, u ...
- Tue Nov 02, 2004 11:13 am
- Forum: Volume 107 (10700-10799)
- Topic: 10750 - Beautiful Points
- Replies: 21
- Views: 15256
less than .2 sec
I solved this by first sorting by x, then searched O(n*n) in worst case, but some optimization led to a solution of 0:00.213 sec. My question is, Is all the solutions takin time < 0.2 sec are using wrong Algo, or using some different Algo. In the former case I want Rejudgement & in the later case I ...
- Mon Oct 18, 2004 9:25 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10747 - Maximum Subsequence
- Replies: 15
- Views: 12289
yes
<^7,
Yes, your outputs are correct. (similar to my AC)Is this output correct?
- Mon Oct 18, 2004 12:10 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10747 - Maximum Subsequence
- Replies: 15
- Views: 12289
Uff
<^7,
Alhamdulillah ! it's AC. I dedicate my solution to Marian.
Alhamdulillah ! it's AC. I dedicate my solution to Marian.
- Sun Oct 17, 2004 7:07 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10747 - Maximum Subsequence
- Replies: 15
- Views: 12289
10747 - Maximum Subsequence
<^7,
I tried to solve the problem 10747 Maximum Subsequence by sorting the numbers by their abs value ( and then replace one of the top K numbers when odd number of negative numbers is in first K) but WA. I also took special care for N=K, all positive, all negative cases.
I need some special ...
I tried to solve the problem 10747 Maximum Subsequence by sorting the numbers by their abs value ( and then replace one of the top K numbers when odd number of negative numbers is in first K) but WA. I also took special care for N=K, all positive, all negative cases.
I need some special ...
- Wed Feb 04, 2004 9:06 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10207 - The Unreal Tournament
- Replies: 23
- Views: 8766
Rubish
Problem says : 'If the value of P(i,j) is undefined you should print -1 as its value with similar formatting '
My question : When P(i,j) is undefined ?
My question : When P(i,j) is undefined ?
- Mon Feb 02, 2004 9:05 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10212 - The Last Non-zero Digit.
- Replies: 63
- Views: 41338
explain
Scorpion,
Can you explain your idea for input : 25 6
Can you explain your idea for input : 25 6
- Tue Dec 16, 2003 4:11 pm
- Forum: Other words
- Topic: Please stop this rejudgement rate
- Replies: 25
- Views: 9507
I want my solution(s) Back
My Dear Judge !
When you send the mail with the subject 'New Judgement', please send the old source code that kept you out of sleep (until you take away others).
nirjon.
When you send the mail with the subject 'New Judgement', please send the old source code that kept you out of sleep (until you take away others).
nirjon.
- Tue Sep 16, 2003 2:54 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10454 - Trexpression
- Replies: 15
- Views: 5484
- Mon Feb 10, 2003 11:14 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10201 - Adventures in Moving - Part IV
- Replies: 23
- Views: 14894
Input Clarification
<^7
HI,
I have got AC.
I only considered those stations which are <= target.
Jucovschi Constantin/ newhh2002 or even Even thinks of a
variety of inputs. You also go for 950/970 ... like outputs. But
Judge data does not have those.
More interesting, My AC code gives another output for ...
HI,
I have got AC.
I only considered those stations which are <= target.
Jucovschi Constantin/ newhh2002 or even Even thinks of a
variety of inputs. You also go for 950/970 ... like outputs. But
Judge data does not have those.
More interesting, My AC code gives another output for ...
- Wed Jan 29, 2003 6:20 pm
- Forum: Algorithms
- Topic: Arbitrary Precision Arithmatic : BigInteger Algorithm
- Replies: 9
- Views: 8519
Bug
Sumon Bhai,
Your Class gives wrong out put for division:
[cpp]BigInteger a("3024"), b("24");
cout << a / b << " ????";[/cpp]
Your Output : 125 ????
How can it be?

Your Class gives wrong out put for division:
[cpp]BigInteger a("3024"), b("24");
cout << a / b << " ????";[/cpp]
Your Output : 125 ????
How can it be?

- Tue Jan 21, 2003 5:06 pm
- Forum: Volume 5 (500-599)
- Topic: 537 - Artificial Intelligence?
- Replies: 76
- Views: 22224
AC
I got AC now :
* input may be like: I=-1e-2A U=2e3V
* donot print minus zero ie, -0.00 : print 0.00

* input may be like: I=-1e-2A U=2e3V
* donot print minus zero ie, -0.00 : print 0.00

- Tue Jan 21, 2003 3:55 pm
- Forum: Volume 5 (500-599)
- Topic: 537 - Artificial Intelligence?
- Replies: 76
- Views: 22224