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 ...
Search found 23 matches
- Sat Feb 23, 2008 10:17 am
- Forum: Volume 100 (10000-10099)
- Topic: 10051 - Tower of Cubes
- Replies: 19
- Views: 11783
- Sun Feb 10, 2008 8:10 am
- Forum: Volume 5 (500-599)
- Topic: 507 - Jill Rides Again
- Replies: 92
- Views: 44547
@Jan
Thanx...I got AC 

- Thu Feb 07, 2008 11:41 pm
- Forum: Volume 5 (500-599)
- Topic: 507 - Jill Rides Again
- Replies: 92
- Views: 44547
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 ...
#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 ...
- Fri Feb 01, 2008 11:01 pm
- Forum: Bugs and suggestions
- Topic: E-mail response and compile errors
- Replies: 4
- Views: 2520
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.
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.
- Fri Feb 01, 2008 6:46 pm
- Forum: Volume 3 (300-399)
- Topic: 341 - Non-Stop Travel
- Replies: 39
- Views: 30239
- Thu Jan 31, 2008 11:05 pm
- Forum: Volume 3 (300-399)
- Topic: 341 - Non-Stop Travel
- Replies: 39
- Views: 30239
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
- Wed Jan 30, 2008 7:05 pm
- Forum: Volume 1 (100-199)
- Topic: 153 - Permalex
- Replies: 32
- Views: 18338
Got Accepted
I had left the problem and after a few months i tried again and got Accepted in 0.00 time(14th rank)
...things change with time 


- Wed Jul 11, 2007 5:23 am
- Forum: Volume 1 (100-199)
- Topic: 153 - Permalex
- Replies: 32
- Views: 18338
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 ...
n i dont know y its working fine on VC++.....i am using cygwin compiler and getting wrong n i ...
- Wed Jul 11, 2007 1:20 am
- Forum: Volume 1 (100-199)
- Topic: 153 - Permalex
- Replies: 32
- Views: 18338
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 ...
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 ...
- Wed Jul 04, 2007 8:14 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10147 - Highways
- Replies: 67
- Views: 31540
- Tue Jul 03, 2007 2:57 pm
- Forum: Algorithms
- Topic: MST !!!
- Replies: 6
- Views: 6925
908
908 is also MST problem
- Tue Jul 03, 2007 9:08 am
- Forum: Volume 101 (10100-10199)
- Topic: 10147 - Highways
- Replies: 67
- Views: 31540
- Sun Jul 01, 2007 9:52 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10147 - Highways
- Replies: 67
- Views: 31540
- Sat Jun 30, 2007 9:24 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10147 - Highways
- Replies: 67
- Views: 31540
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 ...
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 ...
- Wed Jun 13, 2007 5:58 am
- Forum: Volume 4 (400-499)
- Topic: 497 - Strategic Defense Initiative
- Replies: 144
- Views: 44332
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 ...
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 ...