Search found 23 matches

by soddy
Sat Feb 23, 2008 10:17 am
Forum: Volume 100 (10000-10099)
Topic: 10051 - Tower of Cubes
Replies: 19
Views: 9086

WA

I am getting WA for this problem but can't find the bug. I use 2 functions. One for the length of LIS and other to print the LIS. Don't know where am I getting it wrong. Here's the code #include<iostream> #include<sstream> #include<map> #include<vector> #include<iomanip> #define PB push_back using n...
by soddy
Sun Feb 10, 2008 8:10 am
Forum: Volume 5 (500-599)
Topic: 507 - Jill Rides Again
Replies: 92
Views: 30940

@Jan

Thanx...I got AC :D
by soddy
Thu Feb 07, 2008 11:41 pm
Forum: Volume 5 (500-599)
Topic: 507 - Jill Rides Again
Replies: 92
Views: 30940

WA

I am also getting WA in this problem. Here's the code. #include<iostream> using namespace std; int a[20001]; int main() { ios_base::sync_with_stdio(false); int t,n; cin>>t; for(int kase=1;kase<=t;kase++) { cin>>n; for(int i=1;i<n;i++) cin>>a[i]; int x=1,y=1,sum=0,resX=1,resY=1,res=0; while(y<=n) { i...
by soddy
Fri Feb 01, 2008 11:01 pm
Forum: Bugs and suggestions
Topic: E-mail response and compile errors
Replies: 4
Views: 1895

For g++ under cygwin follow these steps,
http://www.claremontmckenna.edu/math/ALee/g++/g++.html

I would suggest you to use mingw because cygwin doesn't support a couple of things like stringstream. I have both on my system and I mostly use mingw.
by soddy
Fri Feb 01, 2008 6:46 pm
Forum: Volume 3 (300-399)
Topic: 341 - Non-Stop Travel
Replies: 38
Views: 14279

Thanx...I got AC :D
by soddy
Thu Jan 31, 2008 11:05 pm
Forum: Volume 3 (300-399)
Topic: 341 - Non-Stop Travel
Replies: 38
Views: 14279

341 - WA

I am continuously getting WA in this problem. This seems to be a simple problem. I am using Floyd Warshall to find the shortest path distance and then backtracking to get the path. Can anybody help?

Code: Select all

Removed after AC
by soddy
Wed Jan 30, 2008 7:05 pm
Forum: Volume 1 (100-199)
Topic: 153 - Permalex
Replies: 32
Views: 13325

Got Accepted

I had left the problem and after a few months i tried again and got Accepted in 0.00 time(14th rank) :D ...things change with time :wink:
by soddy
Wed Jul 11, 2007 5:23 am
Forum: Volume 1 (100-199)
Topic: 153 - Permalex
Replies: 32
Views: 13325

i already tried clearing each variable before a new test case....but still the problem persists.....i dont think clearing variables is the problem since i am initializing new variables for every test case n i dont know y its working fine on VC++.....i am using cygwin compiler and getting wrong n i h...
by soddy
Wed Jul 11, 2007 1:20 am
Forum: Volume 1 (100-199)
Topic: 153 - Permalex
Replies: 32
Views: 13325

Strange problem!!!

I am having a strange kind of problem...n i have no clue :roll: if the input is xzbcoeju aboygp eylfp npljvrvi my output is correct 34573 11 21 8782 but if i change the first input like this xzbcoejuvp aboygp eylfp npljvrvi then my output for last value goes wrong 3225844 11 21 2930 i dont understan...
by soddy
Wed Jul 04, 2007 8:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 21349

helloneo wrote:I got AC with Kruskal..
But it's so slow..
9.937 sec with qsort() library in C
and 3.064 sec with my own quick sort..
i always thought stl is very efficient....can we code our own function three times efficient than stl ones???
by soddy
Tue Jul 03, 2007 2:57 pm
Forum: Algorithms
Topic: MST !!!
Replies: 6
Views: 5590

908

908 is also MST problem
by soddy
Tue Jul 03, 2007 9:08 am
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 21349

i m using stl sort...still getting tle....is thr any other algorithm more efficient than kruskal for this problem???
by soddy
Sun Jul 01, 2007 9:52 pm
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 21349

i can take care of ur case....actually i needed to chk dis at the beginning of the loop but i chked at the end if(hw>=n-1) break; I m implementing Kruskal algorithm....i implemented Kruskal in the same way for 908 and 10034 and got AC in 0.00 and 0.123 repectively.......maybe this code demands a lot...
by soddy
Sat Jun 30, 2007 9:24 pm
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 21349

TLE

i m getting TLE for this problem...can nebody tell me how can i improve the efficiency here is the code #include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<iomanip> #include<set> using namespace std; struct edges{ int v1,v2; int w; }; struct point{ int x,y; }; bool compa...
by soddy
Wed Jun 13, 2007 5:58 am
Forum: Volume 4 (400-499)
Topic: 497 - Strategic Defense Initiative
Replies: 144
Views: 22527

fed up with TLE...

I have tried everythin but still i am getting TLE... wat is the complexity required for this problem First I coded using O(n2) and got TLE then i chked by submitting O(nlogk) solution from net...again I got TLE....i dont think I/O is a problem coz i have tried a lot of test cases......but still here...

Go to advanced search