Search found 16 matches

by Shahriar Nirjon
Mon Jun 02, 2008 3:11 pm
Forum: Algorithms
Topic: An interesting Vector Math Problem
Replies: 2
Views: 1192

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.
by Shahriar Nirjon
Sun Jun 01, 2008 10:12 pm
Forum: Algorithms
Topic: An interesting Vector Math Problem
Replies: 2
Views: 1192

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 x...
by Shahriar Nirjon
Tue Nov 09, 2004 11:38 am
Forum: Volume 107 (10700-10799)
Topic: 10747 - Maximum Subsequence
Replies: 15
Views: 9027

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 may...
by Shahriar Nirjon
Tue Nov 02, 2004 11:13 am
Forum: Volume 107 (10700-10799)
Topic: 10750 - Beautiful Points
Replies: 21
Views: 12957

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 ...
by Shahriar Nirjon
Mon Oct 18, 2004 9:25 pm
Forum: Volume 107 (10700-10799)
Topic: 10747 - Maximum Subsequence
Replies: 15
Views: 9027

yes

<^7,
Is this output correct?
Yes, your outputs are correct. (similar to my AC)
by Shahriar Nirjon
Mon Oct 18, 2004 12:10 pm
Forum: Volume 107 (10700-10799)
Topic: 10747 - Maximum Subsequence
Replies: 15
Views: 9027

Uff

<^7,
Alhamdulillah ! it's AC. I dedicate my solution to Marian.
by Shahriar Nirjon
Sun Oct 17, 2004 7:07 pm
Forum: Volume 107 (10700-10799)
Topic: 10747 - Maximum Subsequence
Replies: 15
Views: 9027

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 input/o...
by Shahriar Nirjon
Wed Feb 04, 2004 9:06 pm
Forum: Volume 102 (10200-10299)
Topic: 10207 - The Unreal Tournament
Replies: 23
Views: 6440

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 ?
by Shahriar Nirjon
Mon Feb 02, 2004 9:05 pm
Forum: Volume 102 (10200-10299)
Topic: 10212 - The Last Non-zero Digit.
Replies: 63
Views: 30989

explain

Scorpion,

Can you explain your idea for input : 25 6
by Shahriar Nirjon
Tue Dec 16, 2003 4:11 pm
Forum: Other words
Topic: Please stop this rejudgement rate
Replies: 25
Views: 5959

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.
by Shahriar Nirjon
Tue Sep 16, 2003 2:54 pm
Forum: Volume 104 (10400-10499)
Topic: 10454 - Trexpression
Replies: 15
Views: 3932

<^7 I've got AC after changing the input taking style. Most possibly the file does not contain a newline at the last line of file. So I checked it like this_ [cpp] int main() { unsigned long long r; char t[256]; //freopen("del.txt", "r", stdin); setF( :o ); while(1) { scanf("%s", t); if(feof(stdin) ...
by Shahriar Nirjon
Mon Feb 10, 2003 11:14 pm
Forum: Volume 102 (10200-10299)
Topic: 10201 - Adventures in Moving - Part IV
Replies: 23
Views: 11577

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 those 10 Inputs...
by Shahriar Nirjon
Wed Jan 29, 2003 6:20 pm
Forum: Algorithms
Topic: Arbitrary Precision Arithmatic : BigInteger Algorithm
Replies: 9
Views: 7495

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?
:o
by Shahriar Nirjon
Tue Jan 21, 2003 5:06 pm
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 10944

AC

I got AC now :

* input may be like: I=-1e-2A U=2e3V
* donot print minus zero ie, -0.00 : print 0.00
:o
by Shahriar Nirjon
Tue Jan 21, 2003 3:55 pm
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 10944

You can try this. But..

3
I=-.002A. U=10V
I=.00A U=-0.00V
I=-1A U=2V
:o

Go to advanced search