hi!
can anyone tell me what is the meaning of "If there is more than one possible answer, print the one that comes first lexicographically" in this problem?
P.S. I have solved the problem before getting a wrong answer because I had diverted by the line.
Thanks in advance
[Sorry for my poor ...
Search found 25 matches
- Tue Jun 10, 2008 8:53 am
- Forum: Volume 113 (11300-11399)
- Topic: 11342 - Three-square
- Replies: 14
- Views: 9165
- Mon Jan 22, 2007 6:24 am
- Forum: Volume 111 (11100-11199)
- Topic: 11158 - Elegant Permuted Sum
- Replies: 23
- Views: 18756
Here is the greedy approah. First sort the array.
Then try to construct the permutation array placing each pair(highest,lowest) of integer into a blank array. Place the highest and lowest number in the middle of the permutation array. Then place the second highest number neighbouring to the lowest ...
Then try to construct the permutation array placing each pair(highest,lowest) of integer into a blank array. Place the highest and lowest number in the middle of the permutation array. Then place the second highest number neighbouring to the lowest ...
- Wed Jan 17, 2007 4:02 am
- Forum: Volume 111 (11100-11199)
- Topic: 11120 - Very Funny Mr. Feynman
- Replies: 11
- Views: 6308
Hi mysword,
I have no Idea about any critical I/O about this problem.
Here is some sample I/O
Input:
Output:
Hope this will help.
I have no Idea about any critical I/O about this problem.
Here is some sample I/O
Input:
Code: Select all
2
3
5
7
11
13
19
23
29
31
37
41
43
47
Code: Select all
2 149 9
3 77 0
5 129 4
7 127 8
11 180 4
13 3 5
17 466 6
19 49 4
23 36 9
29 50 8
31 158 3
37 19 9
41 51 8
43 13 0
47 79 9
- Wed Oct 18, 2006 5:51 am
- Forum: Volume 111 (11100-11199)
- Topic: 11110 - Equidivisions
- Replies: 33
- Views: 24171
Hi slxst,
Try this
input #
output #
Hope it will help.
Try this
input #
Code: Select all
2
1 2 0 0
5
0 0 1 2 1 3 3 2 2 2
2 1 4 2 4 1 5 1 3 1 3
4 5 5 2 5 3 5 5 5 4
2 5 3 4 3 5 4 3 4 4
0
Code: Select all
good
wrong
- Mon Oct 16, 2006 8:02 am
- Forum: Volume 111 (11100-11199)
- Topic: 11120 - Very Funny Mr. Feynman
- Replies: 11
- Views: 6308
11120 - Very Funny Mr. Feynman
Hi,
I have solved the problem using Brute Force Method. At first I am trying to find out a Mathematical Solution or A formula but after spending hours of time I have failed. Is there any possiblity to have a mathematical Solution of this problem.
Thanks in advance
Sorry for my poor english.
I have solved the problem using Brute Force Method. At first I am trying to find out a Mathematical Solution or A formula but after spending hours of time I have failed. Is there any possiblity to have a mathematical Solution of this problem.
Thanks in advance
Sorry for my poor english.
- Mon Oct 16, 2006 4:14 am
- Forum: Volume 111 (11100-11199)
- Topic: 11121 - Base -2
- Replies: 23
- Views: 18326
Hello Lame,
Think about Simply Binary number System
good luck!!
Think about Simply Binary number System
Code: Select all
16 8 4 2 1
6 = 1 1 0
and negative 2 (-2) base System
16 -8 4 -2 1
6 = 1 1 0 1 0
- Mon Oct 16, 2006 3:19 am
- Forum: Volume 9 (900-999)
- Topic: 928 - Eternal Truths
- Replies: 11
- Views: 6578
- Fri Oct 13, 2006 2:20 pm
- Forum: ACM ICPC Archive Board
- Topic: p2195 Counting Zeroes (dhaka regionals)
- Replies: 25
- Views: 14723
- Fri Oct 13, 2006 1:44 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11028 - Sum of Product
- Replies: 24
- Views: 14969
- Fri Oct 13, 2006 1:25 pm
- Forum: Volume 9 (900-999)
- Topic: 928 - Eternal Truths
- Replies: 11
- Views: 6578
- Fri Oct 13, 2006 9:51 am
- Forum: Volume 9 (900-999)
- Topic: 928 - Eternal Truths
- Replies: 11
- Views: 6578
928 - Eternal Truths
I am getting WA several times using BFS with a distance array d[301][301][3]
Can anyone put some input/output.
Thanks in advance
Can anyone put some input/output.
Thanks in advance
- Thu Oct 12, 2006 5:02 am
- Forum: Volume 111 (11100-11199)
- Topic: 11110 - Equidivisions
- Replies: 33
- Views: 24171
- Wed Oct 11, 2006 4:40 am
- Forum: Volume 110 (11000-11099)
- Topic: 11062 - Andy's Second Dictionary
- Replies: 38
- Views: 25013
- Tue Oct 10, 2006 1:37 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11093 - Just Finish it up
- Replies: 14
- Views: 11136
- Tue Oct 10, 2006 1:23 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11094 - Continents
- Replies: 43
- Views: 28198