I am getting RTE, help me out by giving me valid input
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#include<ctype.h>
#define T 1000
#define Z 1000000
typedef struct node *link;
struct node{int n;
int team;
link prev;
link next;
};
link NEW(int n,int team,link prev ...
Search found 14 matches
- Wed Sep 27, 2006 7:20 am
- Forum: Volume 5 (500-599)
- Topic: 540 - Team Queue
- Replies: 37
- Views: 23826
- Wed Sep 27, 2006 5:57 am
- Forum: Volume 5 (500-599)
- Topic: 540 - Team Queue
- Replies: 37
- Views: 23826
- Wed Sep 27, 2006 12:11 am
- Forum: Volume 5 (500-599)
- Topic: 540 - Team Queue
- Replies: 37
- Views: 23826
540 Attack!!!!!
My algorithm times-out during it's run. I am asking for help optimizing my approach. I keep two doubly-linked lists (1) a freelist (2) the team queue. I start by adding every element into the freelist and remove each as they are ENQUEUEd into the team queue. Searching the freelist and adding into to ...
- Wed Aug 16, 2006 6:12 am
- Forum: Volume 102 (10200-10299)
- Topic: 10227 - Forests
- Replies: 23
- Views: 13524
wooooooowwwwwwwwww! what the hell?
1,2,3 hold the same opinions as 4,5 and 6 respectively this makes 3 opinions in total not 4. Is there something I am missing? I have read the problem statement many times
- Tue Aug 08, 2006 1:36 am
- Forum: Volume 4 (400-499)
- Topic: 465 - Overflow
- Replies: 104
- Views: 39013
wtf?????
I have used all the test data in the forum but I still get wrong answer; here is my program.
#include<iostream>
#include<functional>
#include<algorithm>
#include<iterator>
#include<string>
#include<sstream>
#include<climits>
#include<cassert>
using namespace std;
#define LIM 2147483647
int main ...
#include<iostream>
#include<functional>
#include<algorithm>
#include<iterator>
#include<string>
#include<sstream>
#include<climits>
#include<cassert>
using namespace std;
#define LIM 2147483647
int main ...
- Sun Jul 23, 2006 3:28 pm
- Forum: Algorithms
- Topic: about multiple path
- Replies: 5
- Views: 2180
Here is my approach
You can choose any shortest path algorithm so long as you compute the predecessor matrix/array. Then remove the shortest path and run the algorithm once more; you will end up with the alternate shortest path. If you find a way of computing all (same length) shortest paths with a single pass of the ...
- Sun Jul 09, 2006 1:19 am
- Forum: Volume 103 (10300-10399)
- Topic: 10356 - Rough Roads
- Replies: 29
- Views: 19811
- Mon Sep 19, 2005 1:57 am
- Forum: Volume 4 (400-499)
- Topic: 482 - Permutation Arrays
- Replies: 159
- Views: 53345
482 (Permutation Arrays) WA?????? Look here first!!!!!!!!!!!
Do not treat the doubles as doubles, read them in as strings. Ohh dear, have I said too much 

- Sun Sep 18, 2005 6:13 pm
- Forum: Volume 4 (400-499)
- Topic: 450 - Little Black Book
- Replies: 57
- Views: 12331
450 (Little Black Book) WA????? Look here first!!!!!!
You will continue to get WA until you have the right number of dashes above every recond. Copy the dash line from the problem's output (there are 39 if I am not mistaken) paste it on your code. I had my program ACed after doing so; give this a try.
- Fri Sep 16, 2005 9:47 am
- Forum: C++
- Topic: How to skip lines while using cin <<
- Replies: 7
- Views: 6422
Ummmmmm, ......
int main()
{
int n;
cin.ignore(4); // '1' + '\n' + '2' + '\n' = 4 chars
cin>>n;
cout<<n<<endl; // output: 3
}
{
int n;
cin.ignore(4); // '1' + '\n' + '2' + '\n' = 4 chars
cin>>n;
cout<<n<<endl; // output: 3
}
- Fri Jul 15, 2005 2:01 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10183 - How Many Fibs?
- Replies: 66
- Views: 35768
Fibonacci, ....
There is an error in problem 10183 (How many Fibs?) ..... F[2] is defined as 2 instead of 1; you must however use the information as given in order to get an AC.
- Sun Feb 13, 2005 5:18 am
- Forum: Volume 100 (10000-10099)
- Topic: 10067 - Playing with Wheels
- Replies: 62
- Views: 35222
I can't do what?!!!!!!!!!!!!!
Sorry, was just following the [bad] example of others on the board. I will have to do the work myself. On a related note, I just got a copy of the book "The Practice of Programming" thought I might learn good programming habits from the get-go. From the look of things many on the forum should ...
- Sat Feb 12, 2005 6:49 am
- Forum: Volume 100 (10000-10099)
- Topic: 10067 - Playing with Wheels
- Replies: 62
- Views: 35222
- Mon Jan 17, 2005 5:01 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10067 - Playing with Wheels
- Replies: 62
- Views: 35222
10067 AGAIN! :-(
I have checked previous posts and know for sure that my solution is correct and most likely what first comes to mind when dealing with this problem. However, I still can't get mine excepted. If u have any ideas I would love to hear from u.
Thanks, Robert
#include <stdio.h>
#include <stdlib.h ...
Thanks, Robert
#include <stdio.h>
#include <stdlib.h ...