Search found 13 matches

by kangroo
Thu Dec 11, 2008 7:52 pm
Forum: Volume 115 (11500-11599)
Topic: 11512 - GATTACA
Replies: 23
Views: 12968

GATTACA --- Getting TLE !!

hello,

I m getting TLE for GATTACA problem...
below is my code...anyone pls help me !!


int main ()
{
int t = GI;
while ( t -- )
{
char c[1002] = {'\0'};
scanf ( "%s" , c );
string s = c;
mSI mp;

FORZ (i , s.sz)
{
FORZ (j , s.sz - i)
{
string x = s.substr(i , j + 1);
mp [x ...
by kangroo
Tue Nov 11, 2008 4:30 am
Forum: Volume 109 (10900-10999)
Topic: 10992 - The Ghost of Programmers
Replies: 36
Views: 23019

Re: 10992 - The Ghost of Programmers

Hi,
I m getting WA ...I tried BigInt in JAVA...
I cant find wats wrong in my code...
anyone pls help me...


import java.io.*;
import java.math.*;
import java.util.*;

class Main
{

public static boolean leap_year ( BigInteger b )
{
int a = 0;boolean leap = false;
BigInteger [] d1 = new ...
by kangroo
Tue Oct 28, 2008 7:41 am
Forum: Volume 114 (11400-11499)
Topic: 11495 - Bubbles and Buckets
Replies: 6
Views: 6976

11495 - Bubbles and Buckets , TLE

Hi,
I tried to use binary tree and count the number of swaps needed but getting TLE......
below is my code...anyone pls help me !!
thanks in advance !!



#include <iostream>
using namespace std;

struct node
{
int val;
struct node *left;
struct node *right;
};

long long cnt;
struct node *root ...
by kangroo
Tue Oct 28, 2008 7:38 am
Forum: Volume 108 (10800-10899)
Topic: 10810 - Ultra-QuickSort
Replies: 36
Views: 27671

10810 - Ultra-QuickSort , TLE

Hi,
I tried to use binary tree and count the number of swaps needed but getting TLE......
below is my code...anyone pls help me !!
thanks in advance !!


#include <iostream>
using namespace std;

struct node
{
int val;
struct node *left;
struct node *right;
};

long long cnt;
struct node *root ...
by kangroo
Sat Oct 25, 2008 1:30 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 56000

Re: 10226 - Hardwood Species --- getting TLE

hi everyone,

I tried to solve this problem using tries (implementing a structure)...but keep getting TLE...
I think the problem is when getting inputs...
Below is my code ...anyone pls help me !!!
thanks in advance..!!


#include <iostream>
using namespace std;

struct node
{
string word;
int ...
by kangroo
Tue Oct 14, 2008 4:19 pm
Forum: Volume 114 (11400-11499)
Topic: 11494 - Queen
Replies: 11
Views: 7585

11494 - Queen

can anyone provide me some test cases ?...i m getting WA
pls help me!!
thanks in advance..
by kangroo
Tue Oct 14, 2008 12:30 pm
Forum: Volume 114 (11400-11499)
Topic: 11494 - Queen
Replies: 11
Views: 7585

11494 - Queen - doubt in input !!

hi everybody,

is the test case provided by "helloneo" 1 0 2 0 a valid one ??
in the problem desc its given tat 1 <= X1,Y1,X2,Y2 <= 8...
but here Y1 = 0 and Y2 = 0...
how is it posible ???

pls anyone help me to understand that test case...
by kangroo
Sat Oct 11, 2008 9:53 am
Forum: Volume 100 (10000-10099)
Topic: 10009 - All Roads Lead Where?
Replies: 60
Views: 24854

10009 - All Roads Lead Where?

I ve a doubt in the 3rd test case provided by Raiyan Kamal

8 3
Rome Chittagong
Rome Khulna
Rome Pabna
Rome Sylhet
Sylhet Moulovibazar
Chittagong Bandorban
Pabna Gaibandha
Rome Barisal
Rome Chittagong
Khulna Gaibandha
Pabna Sylhet


his output were :
RBC
KRPG
PRS ...
by kangroo
Sat Oct 11, 2008 9:49 am
Forum: Volume 100 (10000-10099)
Topic: 10009 - All Roads Lead Where?
Replies: 60
Views: 24854

10009 - All Roads Lead Where? ----- WA

hi everybody,

now got AC... :D :D
there should not be any blank line after the last test case...
by kangroo
Sat Oct 11, 2008 8:07 am
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 58620

Re: Prob 336(A Node Too Far)-- Runtime Error

Hi everyone,
I m repeatedly getting RE for this problem...
below is my code...anyone pls help me...



vector <int> BFS ( int s , vector < vector <int> > edg)
{
vector <int> D(1001 , INT_MAX) , color(1001 , 1) , pi(1001 , 0);

color[s] = 2;
pi[s] = 0;
D[s] = 0;

queue <int> Q;
Q.push (s ...
by kangroo
Fri Oct 10, 2008 4:36 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 58620

336 : RE

Hi everyone,
I m repeatedly getting RE for this problem...
below is my code...anyone pls help me...



vector <int> BFS ( int s , vector < vector <int> > edg)
{
vector <int> D(1001 , INT_MAX) , color(1001 , 1) , pi(1001 , 0);

color[s] = 2;
pi[s] = 0;
D[s] = 0;

queue <int> Q;
Q.push (s ...
by kangroo
Fri Sep 19, 2008 8:28 am
Forum: Volume 109 (10900-10999)
Topic: 10954 - Add All
Replies: 80
Views: 41629

10954 - Add All Getting TLE !!

problem solved...
used STL <map> and got AC...I think the "STL sort() algortihm" each time in the loop led to TLE...
thanks
by kangroo
Fri Sep 12, 2008 3:38 pm
Forum: Volume 6 (600-699)
Topic: 644 - Immediate Decodability
Replies: 13
Views: 7514

644 - Immediate Decodability ..Getting WA

need help...!!!


#define foriz(i,n) for( i = 0 ; i < n ; i ++ )

bool immediately_decodable ( vecs cd )
{
sort( cd.begin() , cd.end() );
int i , j;
foriz ( i , sz(cd) )
{
foriz ( j , sz(cd) )
{
if ( i != j && sz(cd[j]) >= sz(cd[i]) )
{
string x = cd[j].substr ( 0 , sz(cd[i]) );
if ( x ...

Go to advanced search