But my AC code give different output :
for 1000 1 output = 2
for 1000 1000 output = 2
for 00010 9 output = 9001
I think my procedure according to the problem description is OK.
Search found 9 matches
- Sun Dec 07, 2008 12:54 am
- Forum: Volume 7 (700-799)
- Topic: 713 - Adding Reversed Numbers
- Replies: 142
- Views: 60786
- Sat Dec 06, 2008 2:59 pm
- Forum: Volume 6 (600-699)
- Topic: 674 - Coin Change
- Replies: 77
- Views: 39090
674 -- TLE : need Good Algorithm
Hi,Iam suffering a lot, and need an algorithm badly. Anybody Help me
#include<stdio.h>
#include<iostream.h>
#include<string.h>
int cent_1(int mon);
int cent_5(int mon);
int cent_10(int mon);
int cent_25(int mon);
int cent_50(int mon);
int count=0;
int main(void)
{
int cent, sum;
while(scanf ...
#include<stdio.h>
#include<iostream.h>
#include<string.h>
int cent_1(int mon);
int cent_5(int mon);
int cent_10(int mon);
int cent_25(int mon);
int cent_50(int mon);
int count=0;
int main(void)
{
int cent, sum;
while(scanf ...
- Fri Dec 05, 2008 5:59 am
- Forum: Volume 6 (600-699)
- Topic: 644 - Immediate Decodability
- Replies: 13
- Views: 7514
644 - Immediate Decodability : TERMINATION CONDITION
What is the termination condition of this problem?
No, such type of terination condition.I am getting TLE because of this.Pls, inform
No, such type of terination condition.I am getting TLE because of this.Pls, inform

- Thu Dec 04, 2008 11:43 am
- Forum: Volume 6 (600-699)
- Topic: 623 - 500!
- Replies: 187
- Views: 71648
623 ::: TLE , Need Help.
Tried a lot but getting TLE.
Here is my code
[b]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define M 3000
void BigMul(char *s1, char*s2, char *result);
void string_filter(char *s1, char*s2);
void Bigsum (char *str1,char *str2, char *sum);
void Rev(char *s);
void ...
Here is my code
[b]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define M 3000
void BigMul(char *s1, char*s2, char *result);
void string_filter(char *s1, char*s2);
void Bigsum (char *str1,char *str2, char *sum);
void Rev(char *s);
void ...
- Wed Nov 26, 2008 12:12 am
- Forum: Volume 4 (400-499)
- Topic: 482 - Permutation Arrays
- Replies: 159
- Views: 53554
Re: 482 What A Trick
My Algo...
1.Take test case
2.declare an int array[80000]. Then take input like this :(for first line i,e 3 1 2 )
ch='*'; i=0;
while(ch!='\n')
{
scanf("%d",&array[i++]);
scanf("%c",&ch);
}
3.then take second line of input using 2D array of characters by str[8000][80];
4. Do other process as u ...
1.Take test case
2.declare an int array[80000]. Then take input like this :(for first line i,e 3 1 2 )
ch='*'; i=0;
while(ch!='\n')
{
scanf("%d",&array[i++]);
scanf("%c",&ch);
}
3.then take second line of input using 2D array of characters by str[8000][80];
4. Do other process as u ...
- Tue Nov 25, 2008 10:28 pm
- Forum: Volume 4 (400-499)
- Topic: 482 - Permutation Arrays
- Replies: 159
- Views: 53554
Re: 482 Permutation Arrays
hi, u cant declare an array of size 600,000. array size can be 90000, or some greater than this. I got RTE just for declaring #define SIZE 100000 

- Sat Nov 22, 2008 8:31 pm
- Forum: Volume 4 (400-499)
- Topic: 465 - Overflow
- Replies: 104
- Views: 39142
465 : WA WA WA - Why??
Cant understand whay WA.Pls reply me . I have done this code using Big Number Summation and Big Number multiplication.
Then comparing the result length with the value "2147483647" .. But still WA WA WA WA WA WA
Is my input-Output format is correct ??? Need answer urgent
#include<stdio.h ...
Then comparing the result length with the value "2147483647" .. But still WA WA WA WA WA WA
Is my input-Output format is correct ??? Need answer urgent
#include<stdio.h ...
- Sat Nov 22, 2008 8:26 pm
- Forum: Algorithms
- Topic: about anagram
- Replies: 3
- Views: 2478
454 : Cant understand why WA WA WA WA
I think my input - output format is incorrect. Can someone check this ? Whats wrong wtih my code.Got WA about 30 times !!!
#include<stdio.h>
#include<ctype.h>
#include<string.h>
int MAX_LINES;
char *lineptr[1000];
char str[100][100] , sorted[100][100],mas[100][100];
/*int readlines(char *lptr ...
#include<stdio.h>
#include<ctype.h>
#include<string.h>
int MAX_LINES;
char *lineptr[1000];
char str[100][100] , sorted[100][100],mas[100][100];
/*int readlines(char *lptr ...
- Sat Nov 22, 2008 7:58 pm
- Forum: Volume 4 (400-499)
- Topic: 468 - Key to Success
- Replies: 33
- Views: 7831
468 : How input will be taken
hi Jan,
u told about printing an extra line after the last case.Here is my code. Getting WA again and again.
pls send me the code of taking input and printing output....
#include<stdio.h>
#include<math.h>
#include<string.h>
#define M 9000
int a1[M], a2[M] , p1[M] , p2[M] ;
int main(void)
{
char ...
u told about printing an extra line after the last case.Here is my code. Getting WA again and again.
pls send me the code of taking input and printing output....
#include<stdio.h>
#include<math.h>
#include<string.h>
#define M 9000
int a1[M], a2[M] , p1[M] , p2[M] ;
int main(void)
{
char ...