Search found 22 matches

Thu Jun 09, 2011 4:21 pm
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13811

Re: 11800 - Determine the Shape

Hi suraya... For ur input my accepted output is given... Case 1: Square Case 2: Rectangle Case 3: Rhombus Case 4: Parallelogram Case 5: Trapezium Case 6: Ordinary Quadrilateral Case 7: Ordinary Quadrilateral Case 8: Ordinary Quadrilateral Case 9: Trapezium Case 10: Parallelogram Case 11: Trapezium ...
Tue Jun 07, 2011 10:29 am
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13811

Re: 11800 - Determine the Shape

Hi.. Surya.. Actually i don't see ur code..but from ur explanation i think something is wrong.. you can forward below this approach.. 1.if 4 arm length is equal if 4 angle is 90 --> square else ---> Rhombus 2. if (2 * 2)opposite arm length is equal if 4 angle is 90 --->Rectangle else---->Parallelog...
Tue May 24, 2011 6:46 pm
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13811

Re: 11800 - Determine the Shape

I tried using simplest approach: sort the four position using ccw sorting by cross product check the 90 degree by using trigonometry: AC^2 = AB^2 + BC^2 - 2(AB)(BC)cos d since cos 90 = 0 then AC^2 = AB^2 + BC^2 i check the four side from the position the following is the check : 1. if all 4 is 90 de...
Sun May 22, 2011 4:21 am
Forum: Volume 103 (10300-10399)
Topic: 10360 - Rat Attack
Replies: 19
Views: 44945

Re: 10360 - Rat Attack

Can someone help me and see what's wrong with my code? I keep getting WA but i dont know why. Or can someone give me more sample input? you can check whether you met this condition: If there is more than one of these best positions then the location with the “minimal” position will be chosen. Posit...
Thu May 19, 2011 9:29 pm
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13811

Re: 11800 - Determine the Shape

hello, i try this problem using long no double or floating point involved, but i got WA
is there anything I need to concern ?
any one can help me find what make my code WA, thanks
this is my code:

Code: Select all

``removed``
Thu May 19, 2011 6:45 pm
Forum: Volume 112 (11200-11299)
Topic: 11223 - O: dah dah dah!
Replies: 43
Views: 19281

Re: 11223 - O: dah dah dah!

for concern about input in this problem:
there's trailing space in the end of the line for the test case
my code got PE when assuming there's not
Thu May 19, 2011 4:51 pm
Forum: Volume 105 (10500-10599)
Topic: 10528 - Major Scales
Replies: 2
Views: 663

Re: 10528 Major Scales Wrong Answer Problem

There will be an unexpected output in the intToHuruf function char temp[10] is a local variable, you can't return pointer to this variable since it will be used by other when the process is out of the function PS: just try to make a more elegant code using array of string like: const char *map[] = {...
Wed May 18, 2011 2:13 pm
Forum: Volume 100 (10000-10099)
Topic: 10068 - The Treasure Hunt
Replies: 31
Views: 6401

Re: 10068 - The Treasure Hunt

anyone still try this problem? i tried it using brute force BFS and the result from in I/O in this topic is the same except the path is there any case I need to concern for? or there something I miss? please help, this is my brute force code: AC anyone that still WA, you can check if the case when t...
Tue May 17, 2011 11:18 am
Forum: Volume 108 (10800-10899)
Topic: 10810 - Ultra-QuickSort
Replies: 36
Views: 21116

Re: 10810 - Ultra-QuickSort

I tried using long too and accepted
it mean the judge computer using 64bit now ?
i tried in the 64bit computer and print sizeof(long) and it return 8 which is sizeof(long long) in 32bit computer
Fri May 13, 2011 9:14 pm
Forum: Volume 3 (300-399)
Topic: 330 - Inventory Maintenance
Replies: 26
Views: 7630

Re: 330 - Inventory Maintenance

hello can anybody help me? I've tried all the I/O I found has the same output as my code but still WA is there anything need to be check? here is my code: AC PS : I should print blank line after each report not between report, such a mistake ..., and check the full string for action not just the fir...
Tue Aug 15, 2006 9:57 am
Forum: C++
Topic: something strange about sizeof struct ?
Replies: 2
Views: 1976
Krzysztof Duleba wrote:Have you tried using Google? Hint: "sizeof struct".
well thanks, it doesn't come to my mind
because I just found it to be strange...
Tue Aug 15, 2006 9:32 am
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 21087

Re: 424. Compile Error. Help me~

My code is a little long. but, Actually, I have already written my BigInteger class. So, I just want to reuse my class. here is the error : 04831250_24.c: In method `class BigInt BigInt::operator +(const BigInt &)': 04831250_24.c:47: implicit declaration of function `int max(...)' in the jugde comp...
Tue Aug 15, 2006 8:56 am
Forum: C++
Topic: something strange about sizeof struct ?
Replies: 2
Views: 1976

something strange about sizeof struct ?

I have a problem with sizeof struct with this code #include <stdio.h> struct A { int a; short b; }; struct B { int a; short b,c; }; int main() { printf("%d %d\n",sizeof(struct A),sizeof(struct B)); return 0; } how can sizeof( struct A ) and sizeof( struct B ) is 8 ??? can anyone explain ? and this #...
Tue Aug 15, 2006 2:32 am
Forum: Volume 110 (11000-11099)
Topic: 11062 - Andy's Second Dictionary
Replies: 38
Views: 18789

Re: More case tests

Your code isn't working for: abc^def ghi well thank you, I don't think there will be a '^' in the input Maybe. But your code didn't work for a whole family of such similar symbols... the symbol '^' was just an example of one such symbol... my bad, I was think that there's only character 'A-Za-z0-9!...
Sat Aug 12, 2006 3:32 am
Forum: Volume 110 (11000-11099)
Topic: 11062 - Andy's Second Dictionary
Replies: 38
Views: 18789

Re: More case tests

Martin Macko wrote:
surya ss wrote:I have the same answer but still WA, can someone please check what's wrong with my code ?

Code: Select all

``abc^def ghi``
well thank you, I don't think there will be a '^' in the input