because in all expression is evaluated to true.
On Mon, Jun 13, 2011 at 10:02 PM, sahil sharma sahil18...@gmail.com wrote:
ok i got the values of i ,j ,k ,.in all the 3 codes but can u
please explain me how we get the value of m =1 in all the 3
program.?
--
You received
Bt y k=0, in 2nd code???
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options,
m= ++i || ++j ++k;
++i will evauate to 3 and which is true so as next is ||
so next part will not be evaluated and m = true
On Mon, Jun 13, 2011 at 11:34 PM, udit sharma sharmaudit...@gmail.comwrote:
Bt y k=0, in 2nd code???
--
You received this message because you are subscribed to the
@Sunny: Thn y k=1 in 2nd code???
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more
hmm. Sry yr... Got it.. Thanx.. :) :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For
click on this link and register . it will take less than half a minute
and you will really help me a lot
http://www.earnparttimejobs.com/index.php?id=3407956
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
*case 1 :*
#include stdio.h
#include math.h
#include conio.h
int main()
{
float i = 2.5;
printf (%f %f\n, floor(i), ceil(i));
getch();
return 0;
}
*ans : 2.00 3.00*
*case 2: *
#include stdio.h
#include math.h
#include conio.h
int main()
{
float i = 2.5;
printf (%d
i dont knw wt wrong i have done in this simple problem bt its nt being
accepted at uva judge
here is the link to the problem
http://uva.onlinejudge.org/index.php?option=com_onlinejudgeItemid=8category=6page=show_problemproblem=347
please help me debug my code
#includeiostream
#includecstdio
**https://www.spoj.pl/problems/MCARDS/en/
--
--
regards
*Sudhir Mishra*
MNNIT ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send
problem:https://www.spoj.pl/problems/PARTY/
i m getting wrong answer for dis problem.can anyone help me in
finding de mistake..thank u in advance
#includeiostream
//#includeconio.h
#includevector
#includealgorithm
using namespace std;
//int n;
int item(int c[][501],int i,int wt,vectorint w,int
machi use this..
Define *m*[*i*,*w*] to be the maximum value that can be attained with weight
less than or equal to *w* using items up to *i*.
We can define *m*[*i*,*w*] recursively as follows:
- [image: m[0,\,w]=0]
- [image: m[i,\,0]=0]
- [image: m[i,\,w]=m[i-1,\,w]] if [image:
use segment tree
http://en.wikipedia.org/wiki/Segment_tree
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
please help mewritea program for this problem to reduce the time limit
http://www.codechef.com/problems/FLIPCOIN/
thnx in advance i have ben banging my head on this for a full day
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
see TC forums :
On Wed, Dec 8, 2010 at 10:44 PM, ankit sablok ankit4...@gmail.com wrote:
please help mewritea program for this problem to reduce the time limit
http://www.codechef.com/problems/FLIPCOIN/
thnx in advance i have ben banging my head on this for a full day
--
You received this
#includestdio.h
int main()
{
int arr[11]={0},sum2[1001]={0};
int type[1001]={0};//0 for tails
int N,Q,i,j,sum;
int a,b,c;
scanf(%d,N);
scanf(%d,Q);
for(i=0;iQ;i++)
{
scanf(%d%d%d,a,b,c);
if(a==0)
{
j=b;
int
can anyone suggest me how to go about this problem i m finding it
quite tough
http://www.codechef.com/problems/TEAMSEL/
thanx in advance
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
@coolfrog
in case of AB we asked to A know B after checking this we eliminate A n same
case go for CD den
A B CD
| |
AD
AD Same approach
|
D (D will be celebrity)
On Fri, Sep 24, 2010 at 10:57 AM, kartheek muthyala
if the possibilty of a person knowing other any1 based circular linked.. ie.
1/n..
then none becomes celebrity .. so wat to do in tat situation??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
isn't it supposed to be only O(n) questions.?
On 9/23/10, santhosh santhos4...@gmail.com wrote:
if the possibilty of a person knowing other any1 based circular linked.. ie.
1/n..
then none becomes celebrity .. so wat to do in tat situation??
--
You received this message because you are
And what if more than one person in that set?...let it be c. so u
must ask ac+1(n-1) questions right?
On 9/23/10, Soundar soundha...@gmail.com wrote:
isn't it supposed to be only O(n) questions.?
On 9/23/10, santhosh santhos4...@gmail.com wrote:
if the possibilty of a person knowing
@kartheek
i am getting. this prudent approach
but what is add what remained to the remainder.
suppose u have A,B,C,D and B is celebrity ...
if( A knows B)
{ A is not celb.
if( B knows C){}
else{ C is not celb.
if (C knows B )
{ if( D
is it not finding the articulation point in a graph ? = this has a linear
time solution.
if the edge exist TRUE otherwise FALSE, n x n adjacency matrix with 1/0
(TRUE/FALSE)
Thanks,
Sathaiah
On Wed, Sep 22, 2010 at 9:37 PM, Divesh Dixit
dixit.coolfrog.div...@gmail.com wrote:
Among n people,
Use divide and conquer strategy of algorithm by diving in 2-2 group like
merge sort make tree where every level we dropping people by using logic of
above post so root will be celebrity
On Thu, Sep 23, 2010 at 11:26 AM, kartheek muthyala
kartheek0...@gmail.comwrote:
Take 2 persons, suppose say
@ umesh kewat
suppose A,B,C,D and D is celebrity
A,B C,D
how would u eliminate one form A,B even if u can ... it will be order
of O(n logn) ...
Regards ...
Divesh
On Thu, Sep 23, 2010 at 4:00 AM, umesh kewat umesh1...@gmail.com wrote:
Use divide and conquer strategy of algorithm
@coolfrog,
What I meant by remained is
Considering your case of A,B,C,D and B is the celebrity,
The sequence is
First A,B ask the question to A, then remained=B
Then B,C ask the question to B, then remained=B
Then B,D ask the question to B, then remained= B
Then ask A,C,D whether they know B
@ankur Please give me a proper link.I mean with hash after 4shared.com
On Wed, Sep 22, 2010 at 11:26 AM, ankur aggarwal
ankur.mast@gmail.comwrote:
http://www.4shared.com/
check it..
On Wed, Sep 22, 2010 at 12:00 AM, Nikhil Agarwal
nikhil.bhoja...@gmail.com wrote:
Can anybody share
hey ya man I was also searching for tat ione
, Sep 22, 2010 at 8:37 PM, Nikhil Agarwal nikhil.bhoja...@gmail.com wrote:
@ankur Please give me a proper link.I mean with hash after 4shared.com
On Wed, Sep 22, 2010 at 11:26 AM, ankur aggarwal ankur.mast@gmail.com
wrote:
http://www.4shared.com/
check it..
On Wed, Sep 22, 2010 at 12:00 AM, Nikhil Agarwal
nikhil.bhoja...@gmail.comwrote:
Can anybody share his/her E-copy of An Introduction to algorithm by Udi
manber.It's a great resource.If anybody has please share his E-copy.Thanks
in advance.
--
Thanks
Among n people, a celebrity is defined as someone who is known to
everyone, but who knows no
one. Design and analyze to identify the celebrity, if one exists, by
asking only questions of the
following form: Excuse me, do you know person x? You will get a
binary answer for each such
question asked.
Take 2 persons, suppose say A and B
ask one of them the question about other
if A Knows B, then A cannot be the celebrity,
if A does not know B, then B cannot be the celebrity.
add what remained to the remainder.
repeat this process for the remaining n-1 until one or none remained.
Then if it is
Can anybody share his/her E-copy of An Introduction to algorithm by Udi
manber.It's a great resource.If anybody has please share his E-copy.Thanks
in advance.
--
Thanks Regards
Nikhil Agarwal
Senior Undergraduate
Computer Science Engineering,
National Institute Of Technology, Durgapur,India
In printf, the cursor goes to left to right. so
x++ + ++x + x++
5 + 7 +7 = 19.
( Here x=5, then we put 5 in place of first x, after that x will be
incremented(post increment) that means x is 6 and we take second x which is
pre-increment and hence once again x will be incremented that means x is 7
it is compiler dependant da..the evaluation of this kind of expressions
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
I ran this code..
int main() { int x=5;
printf(%d,(x++ + ++x + x++));
}
The output printed was 18 instead of 19.. Should it not be 19?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
it sud b 19 naaa
x++ = 5
++x = 7
x++ = 7
5+7+7
On Sat, Aug 28, 2010 at 4:35 PM, jagadish jagadish1...@gmail.com wrote:
I ran this code..
int main() { int x=5;
printf(%d,(x++ + ++x + x++));
}
The output printed was 18 instead of 19.. Should it not be 19?
--
You received this message
output is 18
1. control goes to ++x =6 ,x=6
2. control goes to both x++, i.e. both x++ are evaluated together, therefore
x++ + ++x + x++= 6 +6+6 =18 x=7
On 28 August 2010 17:05, jagadish jagadish1...@gmail.com wrote:
I ran this code..
int main() { int x=5;
printf(%d,(x++ + ++x + x++));
The output is undefined. Depends on the compiler. + is not a sequence point
which may result in undefined behavior
On Sat, Aug 28, 2010 at 5:05 PM, jagadish jagadish1...@gmail.com wrote:
I ran this code..
int main() { int x=5;
printf(%d,(x++ + ++x + x++));
}
The output printed was 18
Sir,
I've a question..
Please help me to find the algorithm for evaluating the sine series.
PLEASE HELP It's URGENT,
Please give ans to this problem ASAP.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hello everybody,
I am new to algorithm and has started reading Cormen. I have no mentor to
guide me. I want to verify my answers to the problems given in exercises.
Does anyone having the solution to this book or I should discuss the
solution with this group only?
Hello Everybody,
I am beginner in Algorithms. Which book I should prefer for understanding
basic algos? Also tell me some good book for graph Theory and its basic
algos.
Thanx in advance.
Atul Aggarwal
--~--~-~--~~~---~--~~
You received this message because you
Hi, I try to solve this problem:
The ICPC world finals will be held in a luxurious hotel with a big ballroom.
A buffet meal will
be served in this ballroom, and organizers decided to decorate its walls
with pictures of past
champion teams.
In order to avoid criticism about favouring some of
Hi, I try to solve this problem:
The ICPC world finals will be held in a luxurious hotel with a big ballroom.
A buffet meal will
be served in this ballroom, and organizers decided to decorate its walls
with pictures of past
champion teams.
In order to avoid criticism about favouring some of
Hi,
i need a little help with an algorithm... an algorithm to recognize a
series-parallel graph using (a adaptation probably) the algorithm for
detecting articulation points in a graph. I have no ideea how this
finally algoritm might look i've open a lot of books on graph
theory data
Description:
Given a group of rectangles with different integer width and
height,such as 5*4, 2*3,1*7,etc. The total number of rectangles is
like 10 or more.The problem is how to find a bigger rectangle with a
minimal area which can hold all those given ones. To fix them in,those
rectangles can
hi i have an algorthim code and i have to find the time complixcity of
the code so can you plz help me ASAP the code is written done ,,
# include iostream.h
void main()
{
int a[10][4]=
{{ 16,17,19,13},
{18,14,15,19},
{18,20,20,19},
{13,14,15,10},
Consider a rectangle of M N .Inside that there are many small
overlapping rectangles.Now i have to minimize overlapping area such
that the % increase in size (M N) - 0 .
means readjust smaller rectangles such that they do't overlap.
Please suggest some algorithm !
hi
i'm a begginer.
can anyone guide me how to start in algorithms?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To
I'm unable to solve this problem correctly. Please help me:
You have chess board of size N x M and a lot of bricks of size K x 1.
How many bricks can you place on this board (brick edges must be
pallarel to board edges)
Thanks for help
--~--~-~--~~~---~--~~
You
101 - 148 of 148 matches
Mail list logo