Search found 12 matches

by Ovro
Fri Apr 17, 2015 9:44 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 50878

Re: 147 - Dollars

Now i am having a peculiar problem. I edited my code and this time i got WA. I can see that, for input 1.15 my code outputs 0 in codeblocks. But in visual studio 2012 the same code outputs 62. Why are there two different outputs for same input and for same code ? I am using default settings in both ...
by Ovro
Thu Apr 16, 2015 2:37 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 50878

Re: 147 - Dollars

Getting TLE . I am using recursion here. Should that cause any problem?
#include<iostream>
#include<iomanip>
using namespace std;

unsigned long long int ara[11][30010];
int coin[] = {10000, 5000, 2000, 1000, 500, 200, 100, 50, 20, 10, 5};
unsigned long long coinChange(int type, int value)
{
if ...
by Ovro
Sat Jan 31, 2015 5:54 pm
Forum: Volume 15 (1500-1599)
Topic: 1584 - Circular Sequence
Replies: 3
Views: 3442

Re: 1584 - Circular Sequence

Thanks. Got AC. Only used Global variables instead of those temp variables. :)
by Ovro
Wed Jan 28, 2015 5:07 pm
Forum: Volume 15 (1500-1599)
Topic: 1584 - Circular Sequence
Replies: 3
Views: 3442

Re: 1584 - Circular Sequence

Getting WA . Can someone tell what's the problem?? Thanks in Advance.

#include<iostream>
#include<cstring>
using namespace std;

char *createStr(char str[], int pos)
{
char temp[120];
int len = strlen(str);

for(int i=0;i<len;i++)
{
temp[i] = str[(i+pos)%len];
}
temp[len] = NULL;
return ...
by Ovro
Wed Dec 11, 2013 6:00 am
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51317

Re: 105 - The Skyline Problem

Thanks a lot sir. It is AC now. :)
by Ovro
Tue Dec 10, 2013 7:44 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51317

Re: 105 - The Skyline Problem

Getting WA. Can someone plz help me? #include<stdio.h>
int main()
{
int a1[20100],a2[20100],h[5100],height,ara[20100],i,count=0,j;
while((scanf("%d %d %d",&a1[count],&h[count],&a2[count])==3))
count++;
for(i=0;i<20100;i++)
ara[i]=0;
int k;
for(k=0;k<count;k++)
{
if(a1[k]==a2[k])
continue ...
by Ovro
Sat Dec 07, 2013 6:56 pm
Forum: Volume 115 (11500-11599)
Topic: 11526 - H(n)
Replies: 49
Views: 24755

Re: 11526 - H(n)

I am getting TLE.
If the input is 50, 1 will have to be added to the sum for 25 times(for i=26 to i=50).
Then 2 will have to be added for 18 times(for i=16 to i=25).
3 will have to be added for 4 times(for i = 12 to i=16)
I am doing this till sqrt of n.
Then i am doing the rest of the process in ...
by Ovro
Tue Dec 03, 2013 9:01 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 49506

Re: [11219 - How old are you?] Wrong Answer!! Plz help me

Hello, Getting WA. Can someone tell me why ? #include<stdio.h>
int main()
{
int x1,y1,z1,x2,y2,z2,test,i;
long int day,age;
scanf("%d",&test);
for(i=1;i<=test;i++)
{
printf("\n");
scanf("%d/%d/%d",&x1,&y1,&z1);
scanf("%d/%d/%d",&x2,&y2,&z2);
day=(x1+(y1-1)*30+z1*365)-(x2+(y2-1)*30+z2*365 ...
by Ovro
Tue Nov 26, 2013 5:16 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 152635

Re: 10038 - Jolly Jumpers

Thanx a lot sir. I should have figured it out myself. :)
by Ovro
Mon Nov 25, 2013 6:28 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 152635

Re: 10038 - Jolly Jumpers

Why am i getting Wa? Can anyone help me?

Code: Select all

#Ac
by Ovro
Fri Nov 22, 2013 7:17 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 18831

Re: 476 still WA

Its AC. Thanks a lot sir. :) . But in the problem it is mentioned that there will be at most 10 inputs for the rectangles. Then why i have to take input for more than 10 rectangles ?
And again thanks sir. The problem was driving me crazy. :D
by Ovro
Thu Nov 21, 2013 8:42 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 18831

Re: 476 still WA

Hi! I am getting WA. Can someone tell me why?
#include<stdio.h>
#include<string.h>
int main()
{
int i,j,flag,c;
double reacA[12][2],reacB[12][2],x,y;
char str[5];
for(i=0,c=0;i<10;i++)
{
scanf("%s",str);
if (strcmp(str,"*")==0) break;
c++;
if(strcmp(str,"r")==0) scanf("%lf %lf %lf %lf ...

Go to advanced search