This piece of code is accepted.....
but I am sure it shows wrong output for this input:
3 3 3 3 2 2 2 2 2 2 2 2 2
output should be: YES
but this code shows : NO and however ACCEPTED. WHY???
#include<stdio.h>
#include<stdlib.h>
int comp(void const * a, void const * b)
{
return ( *(int*) b ...
Search found 5 matches
- Sat Oct 31, 2009 5:48 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10664 - Luggage
- Replies: 20
- Views: 16300
- Sat Oct 31, 2009 12:36 am
- Forum: Volume 6 (600-699)
- Topic: 612 - DNA Sorting
- Replies: 122
- Views: 33615
Re: 612 - DNA Sorting without SORTING
One of my solution is accepted. But it is taking almost 2.4s which is longer. So I tried to reduce the time. In the following approach I tried not to use any sorting....... but this code is getting RTE. do you have any idea???
#include<stdio.h>
#include<string.h>
int main()
{
int tcase ...
#include<stdio.h>
#include<string.h>
int main()
{
int tcase ...
- Sat Oct 24, 2009 3:05 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 152668
Re: 10038 - Jolly Jumpers
Help plzzzz ... do you have any idea why this code is getting CE??
code removed after acc
OKK sorted it out
i thought is in the header <math.h>
infact it is in <stdlib.h> header
code removed after acc
OKK sorted it out
i thought
Code: Select all
int abs( int x)
infact it is in <stdlib.h> header
- Fri Oct 23, 2009 1:01 am
- Forum: Volume 4 (400-499)
- Topic: 492 - Pig-Latin
- Replies: 213
- Views: 49439
Why RTE >> Piglatin 492
don't know why getting RTE..... help plzzzzzzzzzzz
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char s[300000],t[300000];
char temp;
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
while(gets(s))
{
long i,len;
len = strlen(s);
//printf("%d",len ...
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char s[300000],t[300000];
char temp;
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
while(gets(s))
{
long i,len;
len = strlen(s);
//printf("%d",len ...
- Mon Oct 19, 2009 11:54 am
- Forum: Volume 112 (11200-11299)
- Topic: 11223 - O: dah dah dah!
- Replies: 43
- Views: 25721
Re: 11223 - O: dah dah dah!
check your '\n' line printing... 
