Search found 25 matches

by shondhi
Wed May 22, 2013 10:14 pm
Forum: Volume 124 (12400-12499)
Topic: 12468 - Zapping
Replies: 1
Views: 1887

12468 - Zapping

Can anyone plz tell me what's wrong in my code.


#include <iostream>
#include <cstdio>
#include <cstdlib>
int main()
{
int a, b, c, d;
while(scanf("%d %d", &a, &b) == 2)
{
if(a == -1 && b == -1)
{
break;
}
else
{
c = abs(a - b);
if(a == 0)
{
d = abs(100 - b);
}
else
{
d = abs ...
by shondhi
Sat Apr 13, 2013 6:05 pm
Forum: Volume 119 (11900-11999)
Topic: 11958 - Coming Home
Replies: 24
Views: 8283

Re: 11958 - Coming Home

Thanks Brian Fry. Got AC!! :)
by shondhi
Fri Apr 12, 2013 5:45 pm
Forum: Volume 116 (11600-11699)
Topic: 11636 - Hello World!
Replies: 30
Views: 12648

Re: 11636 - Hello World!, why wa?

Thanks, got ac..
by shondhi
Fri Apr 12, 2013 5:42 pm
Forum: Volume 119 (11900-11999)
Topic: 11900 - Boiled Eggs
Replies: 14
Views: 4382

Re: 11900 - Boiled Egg

Thanks, got ac!!
by shondhi
Fri Apr 12, 2013 4:23 pm
Forum: Volume 119 (11900-11999)
Topic: 11958 - Coming Home
Replies: 24
Views: 8283

11958 - Coming Home

Code: Select all

Got AC
by shondhi
Sat Feb 23, 2013 2:21 pm
Forum: Volume 119 (11900-11999)
Topic: 11900 - Boiled Eggs
Replies: 14
Views: 4382

11900 - Boiled Egg

Code: Select all

 Got AC 
by shondhi
Thu Feb 14, 2013 9:22 am
Forum: Volume 110 (11000-11099)
Topic: 11063 - B2-Sequence
Replies: 73
Views: 51724

Why WA in UVa: 11063 - B2-Sequence?

I can't understand what's wrong in my code. Can anyone help me to fix my code? My Code is:

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int cases, i, number[102], caseno = 0;
while(scanf("%d", &cases) == 1)
{
int count = 0;
for(i = 1; i <= cases; i++)
{
scanf("%d ...
by shondhi
Fri Nov 30, 2012 9:12 am
Forum: Volume 116 (11600-11699)
Topic: 11636 - Hello World!
Replies: 30
Views: 12648

11636 - Hello World!, why wa?

Code: Select all

Got AC
by shondhi
Mon Nov 12, 2012 1:58 pm
Forum: Off topic (General chit-chat)
Topic: Dynamic Programming in C++
Replies: 2
Views: 31869

Dynamic Programming in C++

Is there any resource to learn dynamic programming in C++? Can anyone provide me any website link or resource link? :)
by shondhi
Sat Nov 03, 2012 5:03 pm
Forum: Volume 113 (11300-11399)
Topic: 11371 - Number Theory for Newbies
Replies: 65
Views: 34414

Got WA at UVa 11371 - Number Theory for Newbies

Can anyone help to fix what's wrong in my code. Here is it:

#include <iostream>
#include <cstdio>
#include <cmath>
long long Reverse(long long a)
{
long long rev = 0, temp, digit;
while(a > 0)
{
digit = a % 10;
rev = rev * 10 + digit;
a /= 10;
}
return rev;
}
using namespace std;
int main ...
by shondhi
Fri Nov 02, 2012 7:28 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153273

Re: 10038 - Jolly Jumpers

Can anyone tell me what's wrong now? Still got WA!!!! :(

#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
int n, i, count, j;
int a[3002], c[3002];
while(cin>>n)
{
for(i = 1; i <= n; i++)
{
cin>>a[i];
}
for(i = 1; i <= n-1; i++)
{
c[i] = abs(a ...
by shondhi
Thu Nov 01, 2012 8:13 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153273

Re: 10038 - Jolly Jumpers

What's wrong in my code? Got WA!!
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
int n, i, count, j;
int a[3002], c[3002];
while(cin>>n)
{
for(i = 1; i <= n; i++)
{
cin>>a[i];
}
for(i = 1; i <= n-1; i++)
{
c[i] = abs(a[i] - a[i+1]);
}
for(i ...
by shondhi
Thu Nov 01, 2012 8:03 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153273

Re: 10038 - Jolly Jumpers

Can anyone provide me some sample input and sample output of Jolly Jumpers?
by shondhi
Mon Oct 29, 2012 6:40 am
Forum: Volume 100 (10000-10099)
Topic: 10014 - Simple calculations
Replies: 34
Views: 13112

10014 - Simple calculations

I can't understand why I got WA? Can anyone please help me. Here is my code:
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int n, test, i;
double sum;
double a1, a0, a2;
double ci[3002];
while(scanf("%d", &n) == 1)
{
cout<<endl;
sum = 0;
scanf("%d", &n);
scanf ...
by shondhi
Tue Oct 16, 2012 10:39 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153273

Re: 10038 - Jolly Jumpers

Thank you for your reply. I just need to check my code.

Go to advanced search