Search found 32 matches

by deadangelx
Sun May 10, 2009 12:52 am
Forum: Volume 2 (200-299)
Topic: 206 - Meals on Wheels Routing System
Replies: 12
Views: 5388

Re: 206 WA

I think the only trick of this problem is to calculate angle.

except 0, 90, 180, 270 degree angle, you can use the formula:

a = atan2( fabs( y-cordinate ), fabs( x-cordinate ) ) * ( 45 / atan( 1.0 ) );


And,

in 1st quadrant angle is just a.
in 2nd quadrant angle is 180 - a
in 3rd quadrant ...
by deadangelx
Fri May 08, 2009 11:44 pm
Forum: General
Topic: New domain uva.onlinejudge.org
Replies: 5
Views: 4679

Re: New domain uva.onlinejudge.org

Hello, Carlos

New machine is cool. I feel it much faster than before.

Where can we understand the details of new machine??

I can see the precision in time is to 0.002 ms.

Thanks.
by deadangelx
Fri May 08, 2009 2:19 pm
Forum: Volume 2 (200-299)
Topic: 205 - Getting There
Replies: 13
Views: 6549

Re:

This problem can be solved by shortest path algorithms.

Did you use A* search??

I have no idea to use Dijkstra to solve this problem.
Because it may be 2 or above paths from one node to the other.

Finally I use backtracking and got AC.

I think it is easy to use backtracking to solve this ...
by deadangelx
Wed Apr 22, 2009 11:51 am
Forum: Volume 2 (200-299)
Topic: 200 - Rare Order
Replies: 25
Views: 17354

Re: 200 - Rare Order - WA

What's the correct output for the case below?


AZ
B
#

Here we are sure that A comes before B, but we can't say anything about Z. The problem description does not explain this case.

EDIT: just read the problem description again and I it seems that there'll be no case like the one above: "Not ...
by deadangelx
Sun Apr 19, 2009 12:21 pm
Forum: Volume 1 (100-199)
Topic: 196 - Spreadsheet
Replies: 42
Views: 16413

Re: What a strange problem: 196!

my AC code uses these sizes:

max row: 999
max column: 999
formula length: 1000
formula divide into cells: 1000
formula queue size(it means how many cells are formula): 8000
cell number length: 8


it means nothing to calculate the threshold of sizes, and these sizes are enough to help you get AC ...
by deadangelx
Sun Apr 19, 2009 3:16 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 58120

Re: 195: anagram, wrong answer

some info about Problem 195
1.there is no blank between characters in the word.
2.the length about 100 characters is enough
3.alphabet order is A -> a -> B -> b -> C -> c ..... -> Y -> y -> Z -> z
4.Problem 146 is similar with Problem 195, but test cases in Problem 146 are weak, and some wrong ...
by deadangelx
Fri Apr 17, 2009 11:34 pm
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 36436

Re: How can i solve the problem 193

If u dont use backtracking to solve this problem, maybe u got WA.
try this test case.
input

1
12 11
1 2
3 1
4 1
5 1
6 1
7 1
8 2
9 2
10 2
11 2
12 2


output

10
3 4 5 6 7 8 9 10 11 12


the graph like

3 4 5 8 9 10
\ | / \ | /
1 ---------- 2
/ | \ / \
6 7 8 11 12


And

in judge test cases ...
by deadangelx
Fri Apr 10, 2009 8:10 pm
Forum: Volume 1 (100-199)
Topic: 189 - Pascal Program Lengths
Replies: 12
Views: 4959

Re: 189 Can anyone explain it to me?

I give a super critical input and output, some codes are from Jan, thanks.

input

program test;
VAR
ch:array['a' .. 'z']of Char;
BEGIN{Ignore 'like a
string'}
(* Comments can be splitted over several lines
and all the operators like + - * / should be ignored
*)Temp:=2;
WRITELN ('''', TEMP.FIRST ...
by deadangelx
Wed Apr 08, 2009 11:33 am
Forum: Volume 1 (100-199)
Topic: 185 - Roman Numerals
Replies: 4
Views: 3285

185 - Roman Numerals

I got 0.780 AC in 185 - Roman Numerals.

first part to calculate roman sum is easy . I have a problem in arabit sum part.

I do all permutation and fill arabit number into roman digits, and judge if the sum is equal to each other.

if count == 0 -> impossible
if count == 1 -> valid
if count == 2 ...
by deadangelx
Mon Apr 06, 2009 7:01 pm
Forum: Volume 1 (100-199)
Topic: 182 - Bonus Bonds
Replies: 10
Views: 3262

Re: 182 - Bonus Bonds - Wrong Answer

some input and output:

input:

1234567890 1
1234567890 2
1234567890 3
1234567890 4
1234567890 5
1234567890 6
1234567890 7
1234567890 8
1234567890 9
1234567890 10
0000000000 0


output:

100000000
24567890
0
0
0
0
0
0
0
0

20000000
20000000
14567890
10000000
10000000
10000000 ...
by deadangelx
Sun Apr 05, 2009 1:10 am
Forum: Volume 1 (100-199)
Topic: 179 - Code Breaking
Replies: 16
Views: 10540

Re: 179 - code breaking

I give 2 hints.

the first hint:
If n is not multiple of k
you can add any the same character after plaintext and cyphertext, like:
k = 5
"abcdabcd"
"bcdabcda"

after add '?'
"abcdabcd??"
"bcdabcda??"

then you can check k = 5

the second hint:
If one string is "abcdeee"
it has possible 3 ...
by deadangelx
Sat Apr 04, 2009 2:28 am
Forum: Volume 1 (100-199)
Topic: 178 - Shuffling Patience
Replies: 15
Views: 5157

Re: Problem 178 - Shuffling Patience

Hi all, I can't understand the problem description,

TS QC 8S 8D is also form one pair of 8

before the next card - QH
why should not cover the 8S??

I am confused and need help, thanks.
by deadangelx
Mon Mar 02, 2009 12:07 pm
Forum: Volume 112 (11200-11299)
Topic: 11203 - Can you decide it for ME?
Replies: 21
Views: 14696

Re: 11203 - Can you decide it for ME?

the hint is

Code: Select all

M is only one
E is only one
x is at least 1 '?'
y is at least 1 '?'
z is at least 2 '?'
y.length == (z.length - x.length)
Hope is helps.
by deadangelx
Mon Mar 02, 2009 5:00 am
Forum: Volume 111 (11100-11199)
Topic: 11184 - Joyful Ride
Replies: 11
Views: 9385

Re: 11184 - Joyful Ride

test cases

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
0


answer

Case 1: -1
Case 2: 1 2 4
Case 3: 1 3 2 5
Case 4: -1
Case 5: -1
Case 6: 1 4 5 3 7 2 8
Case 7: 1 5 4 6 3 8 2 9
Case 8: -1
Case 9: -1 ...
by deadangelx
Fri Feb 13, 2009 9:44 am
Forum: Volume 111 (11100-11199)
Topic: 11121 - Base -2
Replies: 23
Views: 18338

Re: 11121 - Base -2

test cases

Code: Select all

4
1000000000
-1000000000
1024
-1024
answer

Code: Select all

Case #1: 1001100111011111101111000000000
Case #2: 11000101101001010100101000000000
Case #3: 10000000000
Case #4: 110000000000
hope it helps.

Go to advanced search