Search found 5 matches

by Parleen
Sun Jul 15, 2007 7:47 pm
Forum: Volume 112 (11200-11299)
Topic: 11240 - Antimonotonicity
Replies: 33
Views: 16950

thanxsunny ,
can anybody see my code in page 1, i did it without using array and dont know why i got wrong answer , otherwise please provide some input output
by Parleen
Sun Jul 15, 2007 6:59 pm
Forum: Volume 112 (11200-11299)
Topic: 11240 - Antimonotonicity
Replies: 33
Views: 16950

sunny wrote:I did greedy.

My solution is O(n) without any extra memory(not even an array to store all numbers).
then what is this?
by Parleen
Sun Jul 15, 2007 6:37 pm
Forum: Volume 112 (11200-11299)
Topic: 11240 - Antimonotonicity
Replies: 33
Views: 16950

Please tell me what's wrong in my code? I couldnt find bug in my problem
Or send some critical input/output here :



#include<stdio.h>
#include<math.h>

long a,b,c,i,j,k;
void main()
{
long par,inp,test,max,count,t;

scanf("%ld",&test);

for(t=1;t<=test;t++)
{
scanf("%ld",&inp);
max=0;count=0;

if ...
by Parleen
Sun Jul 08, 2007 2:00 pm
Forum: Volume 112 (11200-11299)
Topic: 11222 - Only I did it!
Replies: 14
Views: 9736

while i was trying to post my wrong answer code here, i tried to make some test case to post here and suddenly found my very silly mistake. but this test can really help anybody.


4
3 1 2 3
3 2 1 3
3 0 1 2

3 3 2 1
3 4 2 1
4 5 9 6 2

2 1 0
2 1 0
2 1 0

3 4 6 5
3 6 5 4
3 9 8 7

my accepted answer ...
by Parleen
Sun Jun 24, 2007 7:14 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 49506

Plz tell me whats wrong in my code, it gives correct answer for all the i/o above..... :o

#include<stdio.h>
#include<math.h>

void main()
{
long d,m,y,d1,m1,y1,d2,m2,y2,a,b,c,i,j,k,test,t;
char cy,cur[12],bir[12],ch,c1,c2,c3;

scanf("%ld",&test);

ch=getchar();
for(t=1;t<=test;t++)
{

cy=getchar ...

Go to advanced search