yeah .. the input will bw given that only for which solution is possible
On Wed, Feb 9, 2011 at 1:18 PM, Jitesh Kumar jitesh2...@gmail.com wrote:
Can you give me solution for N=1 and N=2?
I don't think that it is possible for every N.
--
You received this message because you are subscribed
For N=3, multiple solutions exists
3 1 2 1 3 2
2 3 1 2 1 3
what about this??
On Wed, Feb 9, 2011 at 1:35 PM, jalaj jaiswal jalaj.jaiswa...@gmail.comwrote:
yeah .. the input will bw given that only for which solution is possible
On Wed, Feb 9, 2011 at 1:18 PM, Jitesh Kumar
This is not a solution dude
in the solution the sum of any 2 consecutive nos shld be a perfect square :)
On Wed, Feb 9, 2011 at 2:19 PM, Jitesh Kumar jitesh2...@gmail.com wrote:
For N=3, multiple solutions exists
3 1 2 1 3 2
2 3 1 2 1 3
what about this??
On Wed, Feb 9, 2011 at 1:35 PM,
I didn't get you..
In your example
One of the possible placement for 7 numbers in 14 positions is :
5 7 2 3 6 2 5 3 4 7 1 6 1 4
there is no perfect square...
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
Write a program that reads a contents of webpages?
--
*Anil Kumar Arya*
*B.Tech 2nd Year*
*Motilal Nehru National Institute of Technology,*
*Allahabad*
*211004*
*Email id:-**aryaanil...@gmail.com *
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
@ jitesh i am sorry
that was for a different question
yeah your interpretation is right
On Wed, Feb 9, 2011 at 3:02 PM, Jitesh Kumar jitesh2...@gmail.com wrote:
I didn't get you..
In your example
One of the possible placement for 7 numbers in 14 positions is :
5 7 2 3 6 2 5 3 4 7 1 6 1 4
there is problem with the update function...
On Tue, Feb 8, 2011 at 8:14 PM, Gaurav Saxena grvsaxena...@gmail.comwrote:
Hey thanks for your help
I have written a code using range trees but I am still getting TLE [?][?][?]
Please suggest me something
Here is my code
/*
* File: main1.c
Suppose n people are arranged in a circle. Number the people from 1 to
n. in the clockwise order. We are given an integer ,m = n. Beginning
with the person with designated number 1, we proceed around the circle
(in clockwise order) removing every mth person. After each person is
removed, counting
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n events based on there finish time f(i)
Say sorted meeting(based on finishing time) are:
e1,e2,e3,e4,...en
E(t): denotes the maximum no of meetings conducted where 0 = time = t.
E(f1) = e1
E(f2) = max(E(s2) + 1),
thanx
On Wed, Feb 9, 2011 at 3:47 PM, Rajeev Kumar rajeevprasa...@gmail.comwrote:
I don't know about cpp.But you can do it using selenium framework...
On Wed, Feb 9, 2011 at 3:04 PM, Anil Kumar aRY@ aryaanil...@gmail.comwrote:
Write a program that reads a contents of webpages?
--
*Anil
how many passwords can be made if
1. there should be atleast 3 capital letters
2. atleast 3 small letters
3. atleast 2 numbers 0-9
4 the password should has length=10
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
is it
26C3 * 26C3 * 10C2 * 62C2 * 10!
On Wed, Feb 9, 2011 at 7:16 PM, snehal jain learner@gmail.com wrote:
how many passwords can be made if
1. there should be atleast 3 capital letters
2. atleast 3 small letters
3. atleast 2 numbers 0-9
4 the password should has length=10
--
You
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n events based on there finish time f(i)
Say sorted meeting(based on finishing time) are:
e1,e2,e3,e4,...en
Are all the selected letters or numbers always different?
If they can also be same then answer would be different.
On Wed, Feb 9, 2011 at 7:20 PM, sunny agrawal sunny816.i...@gmail.comwrote:
is it
26C3 * 26C3 * 10C2 * 62C2 * 10!
On Wed, Feb 9, 2011 at 7:16 PM, snehal jain
sorry.
did not go thru it thoroughly earlier.
got it now.
On Feb 9, 7:35 pm, Tushar Bindal tushicom...@gmail.com wrote:
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time
Given: An array of integers(may be both positive and negative), we
have to find out the minimum positive sum of array(not necessarily
continuous).
example:- {1,-5,7,10,-14,16,-17,20,21,22}
here answer is -5,-17,22 having sum=0;
--
You received this message because you are subscribed
Given: An array of integers(may be both positive and negative), we
have to find out the minimum positive sum of array(not necessarily
continuous).
example:- {1,-5,7,10,-14,16,-17,20,21,22}
here answer is -5,-17,22 having sum=0;
--
You received this message because you are subscribed
letters and no. can be same... so the ans shd be different
On Wed, Feb 9, 2011 at 8:14 PM, Tushar Bindal tushicom...@gmail.com wrote:
Are all the selected letters or numbers always different?
If they can also be same then answer would be different.
On Wed, Feb 9, 2011 at 7:20 PM, sunny
@jalaj: text missing.??? I think i've mentioned question
properly.is there any thing more u require?
n Feb 9, 9:45 pm, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote:
@monsieur ... text missing dude
On Wed, Feb 9, 2011 at 10:12 PM, MONSIEUR monsieur@gmail.com wrote:
Given: An
yes they can be same, forgot to consider that
so it should be
(26^3)*(26^3)*(10^2)*(62^2)*(10!)
??
On Wed, Feb 9, 2011 at 10:20 PM, snehal jain learner@gmail.com wrote:
letters and no. can be same... so the ans shd be different
On Wed, Feb 9, 2011 at 8:14 PM, Tushar Bindal
I think the only solution will be finding all subsets.
2011/2/9 MONSIEUR monsieur@gmail.com
@jalaj: text missing.??? I think i've mentioned question
properly.is there any thing more u require?
n Feb 9, 9:45 pm, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote:
@monsieur ... text
maybe using a circular linked list.
2011/2/9 punnu punnu.gino...@gmail.com
Suppose n people are arranged in a circle. Number the people from 1 to
n. in the clockwise order. We are given an integer ,m = n. Beginning
with the person with designated number 1, we proceed around the circle
(in
@sunny
i think even this wont work
multiplying by 10! is wrong as when we have selecting same letters or
numbers then permutions will be fewer than 10!..
correct me if i am wrong..
On Wed, Feb 9, 2011 at 10:33 PM, sunny agrawal sunny816.i...@gmail.comwrote:
yes they can be same, forgot to
right, it will also not work
On Wed, Feb 9, 2011 at 10:42 PM, snehal jain learner@gmail.com wrote:
@sunny
i think even this wont work
multiplying by 10! is wrong as when we have selecting same letters or
numbers then permutions will be fewer than 10!..
correct me if i am wrong..
On
@apaza: brute force.checking all combinations(with at least one
negative number,if any)..too hard buddy.
On Feb 9, 10:07 pm, Rel Guzman Apaza rgap...@gmail.com wrote:
I think the only solution will be finding all subsets.
2011/2/9 MONSIEUR monsieur@gmail.com
@jalaj: text
you are not actually using the concept of lazy propagation in the code, you
are doing update in O(n). if you want the solution then reply back.
On Wed, Feb 9, 2011 at 6:22 PM, Gaurav Saxena grvsaxena...@gmail.comwrote:
@arpit : could you please tell me what is the problem with the update
@sunny: actually it is not like maximum positive sum.it is
necessary to select at least one number.The only constraint is MINIMUM
POSITIVE SUM , If all numbers are negative then print simply no
positive sum exist.
example: {-300,98,-230}
answer: 98
On Feb 9, 10:23 pm, sunny agrawal
Yes actually I could not figure out how to implement that lazy propagation
in the array . Yes please help me in doing that.
On Wed, Feb 9, 2011 at 10:56 PM, Arpit Sood soodfi...@gmail.com wrote:
you are not actually using the concept of lazy propagation in the code, you
are doing update in
@Monsieur: Note that 0 is not positive so it doesn't match your stated
solution requirement. Maybe you meant non-negative instead of
positive, or maybe you meant that the answer is 1, having sum=1.
Dave
On Feb 9, 10:42 am, MONSIEUR monsieur@gmail.com wrote:
Given: An array of integers(may
https://www.spoj.pl/problems/RENT/
tried dp for this problem.. getting tle.. classifier says this is
binary search. not able to get how to binary search this problem..
help me out...
thanks..
karthikeyan..
--
You received this message because you are subscribed to the Google Groups
Algorithm
This is a josephus problem, using a circular linked list takes cuadratic
time O( m n ), I think the josephus problem can be solved using rank trees
in O(n log n).
Construct a rank tree from an array with n elements storing the elements in
a binary tree in in-order sequence ( Constructor ). Store
---
SUDHIR MISHRA wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-62d5befb93-a1202cc5cd-5oEiMcLpaEPVY-UR9eGSSYdrezQ
You'll
The following combinations of capital letters C, lower case letters
l, and digits d are possible:
C l d Number possible
3 3 4 10C3 * 26^3 * 7C3 * 26^3 * 4C4 * 10^4
3 4 3 10C3 * 26^3 * 7C4 * 26^4 * 3C3 * 10^3
3 5 2 10C3 * 26^3 * 7C5 * 26^5 * 2C2 * 10^2
4 3 3 10C4 * 26^4 * 6C3 * 26^3 * 3C3 *
@ Dave : I think this shud also give the same result
C(26, 3) * C(26, 3) * C(10, 2) * C(62, 2)
On Wed, Feb 9, 2011 at 7:16 PM, snehal jain learner@gmail.com wrote:
how many passwords can be made if
1. there should be atleast 3 capital letters
2. atleast 3 small letters
3. atleast 2
Also it shud now be multiplied with Factorial of 10
On Thu, Feb 10, 2011 at 1:14 AM, Manmeet Singh mans.aus...@gmail.comwrote:
@ Dave : I think this shud also give the same result
C(26, 3) * C(26, 3) * C(10, 2) * C(62, 2)
On Wed, Feb 9, 2011 at 7:16 PM, snehal jain learner@gmail.com
No. That is too large, at 2,087,438,895,360,000,000. Analyzing your
expression, 26C3 is the number of ways to choose 3 different letters,
but the letters can be the same. The number of combinations of 3
letters with repetitions is 26^3. So that aspect of your formula is
too small. However, you
1. write a function to convert a decimal no. to Roman no. (10 marks)
2. Design a elevators system for 50 storied hotel.
condition are... at least one left should be available on ground
flore. Min. time is expected ot reach the any floore... (5 marks)
3. Design all the test case for
1. there should be atleast 3 capital letters
2. atleast 3 small letters
- 6 spaces gone for these, with repetitions allowed.
for 3 spaces, we have 26^3 possibilities, and they can be arranged in
10C3 ways...
for the next 3, they can be arranged in 7C3 ways
3. atleast 2 numbers 0-9
now, 4
@SVIX: According to my calculation, this gives
2,992,430,052,218,880,000, almost 12 times the correct answer,
251,471,033,958,144,000, that I gave earlier in posting
http://groups.google.com/group/algogeeks/msg/bb2269736a997419. This is
because you are counting some passwords multiple times.
ah... I see what you're saying...
On Feb 9, 8:56 pm, Dave dave_and_da...@juno.com wrote:
@SVIX: According to my calculation, this gives
2,992,430,052,218,880,000, almost 12 times the correct answer,
251,471,033,958,144,000, that I gave earlier in
CALL FOR PAPERS
and
Call For Workshop/Session Proposals
FCS'11
The 2011 International Conference on Foundations
of Computer Science
Date and Location: July
sort the input array. only following operations on array is allowed:
1)get(index) -gets the element at that index
2)reverse(int start,int end) - example reverse(1,3) for the array
[1,2,3,4,5] will return [1,4,3,2,5]
better then nlogn
--
With Regards,
*Jalaj Jaiswal* (+919019947895)
Software
Hi!
The Department of Computer Science, University of Delhi is organising
its annual technical fest - Sankalan 2011 on 5th and 6th of March,
2011. The fest consists of technical as well as non technical events.
Kindly refer to http://cs.du.ac.in/sankalan2011
A technical paper presentation event
43 matches
Mail list logo