Iam getting wrong answer for the 492 question. I have checked most of the
cases I can think of .
<code>
#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main ()
{
string x = "";
char ch ...
Search found 4 matches
- Thu Oct 20, 2005 3:19 pm
- Forum: Volume 4 (400-499)
- Topic: 492 - Pig-Latin
- Replies: 213
- Views: 49433
- Tue May 31, 2005 4:28 pm
- Forum: Volume 1 (100-199)
- Topic: 103 - Stacking Boxes
- Replies: 200
- Views: 50323
The Code for the problem is
This is the code that is giving WA .
#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
bool operator < (vector <int > a , vector <int> b)
{
for (int i = 0 ; i < a.size () -1; i ++ )
{
if (a >= b )
return false;
}
return true;
}
void ...
#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
bool operator < (vector <int > a , vector <int> b)
{
for (int i = 0 ; i < a.size () -1; i ++ )
{
if (a >= b )
return false;
}
return true;
}
void ...
- Mon May 30, 2005 11:26 pm
- Forum: Volume 1 (100-199)
- Topic: 103 - Stacking Boxes
- Replies: 200
- Views: 50323
103 problem ...
I has solved this problem 103 before . But due to recorrection it got a WA.
My algo is simple ..
I define a order of the boxes and sort them. Then I apply the longest increasing
subsequence algo to get the correct sequence.
The order in which I sort is if Box A can be placed inside Box B the A ...
My algo is simple ..
I define a order of the boxes and sort them. Then I apply the longest increasing
subsequence algo to get the correct sequence.
The order in which I sort is if Box A can be placed inside Box B the A ...
- Wed Nov 10, 2004 8:53 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 67033
10324 WA Help needed
This is my Code :
[cpp]
#include <iostream>
using namespace std;
int main (){
char str ,ch;
int countArr [1000001];
int len;
int n;
int a,b;
int min , max;
int count = 0 ;
int casCount = 1;
while (1)
{
count = 0;
while(1)
{
cin.unsetf(ios::skipws);
cin >> ch;
cin.setf(ios::skipws);
if( ch ...
[cpp]
#include <iostream>
using namespace std;
int main (){
char str ,ch;
int countArr [1000001];
int len;
int n;
int a,b;
int min , max;
int count = 0 ;
int casCount = 1;
while (1)
{
count = 0;
while(1)
{
cin.unsetf(ios::skipws);
cin >> ch;
cin.setf(ios::skipws);
if( ch ...