Search found 10 matches

by emka
Mon Jun 21, 2004 5:58 am
Forum: Volume 7 (700-799)
Topic: 755 - 487--3279
Replies: 115
Views: 29129

755 - "487-3279" WA

Hi, I've tested my code with all possible input characteristics... and seems to be working correctly.... but when I tried to submit it, it keeps giving me WA.... can anyone find where the the bugs are... :( [c] #include <stdio.h> #include <string.h> #include <stdlib.h> long list[100005]; long cnt, n...
by emka
Sat Jun 19, 2004 6:35 pm
Forum: Volume 8 (800-899)
Topic: 810 - A Dicey Problem
Replies: 0
Views: 1599

810 - A Dicey Problem

Hi All, I wrote the following code, and was working correctly on the sample testcases. Could anyone of you find where the bug is? OR maybe a testcase that will fail this program. Thanks :) [cpp] #include <iostream> #include <string> using namespace std; #define UP 1 #define DOWN 2 #define LEFT 3 #de...
by emka
Mon Jun 14, 2004 6:58 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 29807

Well done, got AC now!

Thanks a lot :wink:
by emka
Fri Jun 11, 2004 11:18 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 29807

10405 - LCS: Any idea why my prog is WA ?

Hi Can anybody figure out the bugs within my code? I got WA for this. Thanks :) [cpp] #include <iostream> #include <string.h> using namespace std; int main(void){ int ar[2][1001], top = 1, bottom = 0; char s1[1001], s2[1001]; while ( cin ){ cin.getline( s1, 1001 ); cin.getline( s2, 1001 ); //-------...
by emka
Mon Oct 21, 2002 8:33 pm
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8115

WOW!! :o :o

I was surprised why it can get accepted...
So the main problem is that the point can lies on the edge of the rectangle, right...

thanks anyway.
by emka
Sun Oct 20, 2002 9:07 pm
Forum: C++
Topic: String Class
Replies: 9
Views: 4993

thanks very much.. it works...
^_^

but the problem now is, how can I read a whole line of a string?

if I use

Code: Select all

string s;
cin >> s;
it only reads one word from the buffer.
by emka
Sun Oct 20, 2002 9:57 am
Forum: C++
Topic: String Class
Replies: 9
Views: 4993

String Class

Hi everyone,

I would like to ask you about how to use the String class??

usually I use:

[cpp]#include <String.h>
...
String s;
...
[/cpp]

but I cannot do it in VC++
by emka
Sun Oct 20, 2002 9:47 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8115

I have changed the function rectangle.isInside() to be like the following function, to make sure that if the point lies outside the boundary, then it will return 0 [cpp]int rectangle::isInside(tPoint p){ if ( upper.x - p.x > 0.00001 ) return 0; if ( p.x - lower.x > 0.00001 ) return 0; if ( p.y - upp...
by emka
Sun Oct 20, 2002 1:30 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8115

This is what I quoted from the problem description: The first character will designate the type of figure (``r'' for rectangle). This character will be followed by four real values designating the x-y coordinates of the upper left and lower right corners. I have updated my code, and make sure that: ...
by emka
Sat Oct 19, 2002 7:26 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8115

476 problem HELP!

Hi, I don't know what is wrong with my program, so that it always get WA? Is there any special tricks or something like that? anyone please help! [cpp] #include <iostream.h> #include <math.h> typedef struct{ double x,y; }tPoint; class rectangle{ private: tPoint upper,lower; public: int isInside(tPoi...

Go to advanced search