Search found 20 matches

by ani_mitr86
Sun Nov 02, 2008 7:54 pm
Forum: Volume 115 (11500-11599)
Topic: 11551 - Experienced Endeavour
Replies: 5
Views: 1703

11551 - Experienced Endeavour

I think that there is a mistake in the second image. The subscript of the last number should be i, x(i-1) and not i, x(i). I hope some admin notices this and fix the mistake. I don't know where else to report this so I am posting this here.
by ani_mitr86
Sat Jul 05, 2008 2:36 pm
Forum: Volume 101 (10100-10199)
Topic: 10199 - Tourist Guide
Replies: 57
Views: 40716

Re: 10199 - Tourist Guide


#include<cstdio>
#include<map>
#include<vector>
#include<string>
#include<algorithm>
#include<iostream>
using namespace std;
//#include<conio.h>

void articulation_point_visit
(vector<int> *list, int* d, int* low, int* child_cnt, int n, int& time){
low[n]=d[n]=time++;
int l=list[n].size();
for ...
by ani_mitr86
Wed Jun 11, 2008 3:49 pm
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 25075

Re: confused by statesments of prob117

here is the code

#include<cstdio>
#include<cstring>
//#include<conio.h>

#define MAX 'z'
#define MIN 'a'
#define INFINITY 20000000000000000LL

typedef int vertex;

struct edge{
vertex u, v;
};

void bellman_ford(vertex source, long long* dist, edge* list, int* wt, int sz){
for(vertex i=MIN; i ...
by ani_mitr86
Wed Jun 11, 2008 3:35 pm
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 25075

Re: confused by statesments of prob117

When I tried to find the minimum distance by Bellman Ford it was giving WA. So, I tested if the graph is connected or not and I found that some unconnected graph is there contradicting the problem statement. so, there is a mistake in data set.
by ani_mitr86
Thu Mar 20, 2008 1:06 pm
Forum: Volume 114 (11400-11499)
Topic: 11404 - Palindromic Subsequence
Replies: 25
Views: 18245

thanks

it does pass the input in the board

probably u r right......I will try to implement it in better way
by ani_mitr86
Thu Mar 20, 2008 9:56 am
Forum: Volume 114 (11400-11499)
Topic: 11404 - Palindromic Subsequence
Replies: 25
Views: 18245

help plz

can anybody tell me the problem with my programs? I solve dit by two methods.but both are giving TLE

first i jaust implemented the LCS On^2 algo for the string and its reverse to find the palindrome

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

string c, rc, a ...
by ani_mitr86
Thu Jan 24, 2008 8:09 am
Forum: Volume 113 (11300-11399)
Topic: 11390 - The Sultan's Feast
Replies: 14
Views: 6271

thanks ..

i will try to implement the idea
by ani_mitr86
Wed Jan 23, 2008 5:16 pm
Forum: Volume 114 (11400-11499)
Topic: 11403 - Binary Multiplication
Replies: 25
Views: 13900

thanks...

But this is pathetic that something given in problem description is wrong
by ani_mitr86
Wed Jan 23, 2008 5:07 pm
Forum: Volume 113 (11300-11399)
Topic: 11390 - The Sultan's Feast
Replies: 14
Views: 6271

can somebody help me out?

thanks in advance
by ani_mitr86
Wed Jan 23, 2008 5:03 pm
Forum: Volume 114 (11400-11499)
Topic: 11403 - Binary Multiplication
Replies: 25
Views: 13900

hello

I don't understand why i keep getting TLE

can somebody help

here is my code

Code: Select all

//removed
by ani_mitr86
Wed Jan 23, 2008 4:48 pm
Forum: Volume 113 (11300-11399)
Topic: 11397 - Reconstructing Binary Forests
Replies: 2
Views: 1905

thanks...

to see that nobody has been able to do it is disheartening
by ani_mitr86
Tue Jan 22, 2008 8:33 pm
Forum: Volume 113 (11300-11399)
Topic: 11397 - Reconstructing Binary Forests
Replies: 2
Views: 1905

11397 - Reconstructing Binary Forests

can anybody give some test cases or an explaination of the problem.

Here is my code

#include <iostream>

using namespace std;

int a[128], n;
long long m, c[101][101];

void perm(){
int i, j;
for(i=0; i<101; i++){ c[i][0]=1; c[i][i]=1;}
for(i=1; i<101; i++) for(j=1; j<i; j++) c[i][j]=(c[i-1][j ...
by ani_mitr86
Tue Sep 11, 2007 7:49 am
Forum: Volume 112 (11200-11299)
Topic: 11266 - Equations
Replies: 15
Views: 8253

thanks to all who helped me, i hv now got it ac
there was a bug, logic was fine

thank to all once again
by ani_mitr86
Sat Sep 08, 2007 3:50 pm
Forum: Volume 112 (11200-11299)
Topic: 11266 - Equations
Replies: 15
Views: 8253

actually in c++ -1%3 is giving -1 and not 2, i wonder why cna smbd tell

but still i fixed this problem and got the correct ans for the sample i/o

but still i am getting wrong ans

anyway thanks to all for the help
by ani_mitr86
Fri Sep 07, 2007 3:13 pm
Forum: Volume 112 (11200-11299)
Topic: 11261 - Bishops
Replies: 13
Views: 4881

i hv already done that and since looping through diagonals but got TLE

i know hw to find no. of 1s in btweem i and j index of binary array with O(1) and O(n) precomputing.

but in this problem there will be a n*n binary array and n*n order precomputing will give TLE

i really don't know what to do

Go to advanced search