thank you, Dmytro_Chernysh..
But my method doesn't work in such case:
input :
8 + 97 + 100 = 6 + 4 + 97 + 100
abs(205 - 207) = 2
Can't find swaping elements that resulting in decreasing abs(sum1-sum2),
so output "no solution".
But there exists one solution like:
6 + 100 + 100 = 8 + 4 + 97 ...
Search found 20 matches
- Tue Oct 14, 2003 7:15 am
- Forum: Volume 103 (10300-10399)
- Topic: 10317 - Equating Equations
- Replies: 13
- Views: 9682
- Tue Oct 07, 2003 8:05 am
- Forum: Volume 103 (10300-10399)
- Topic: 10317 - Equating Equations
- Replies: 13
- Views: 9682
10317 WA..please help me..^^
Could anyone give me some test data, please...
My method is
1. Move the minus operand to the opposite side, and memorize the
locations of all operators in each side.
2. Count the summation of each side, and count the abs(sum1-sum2).
If
abs(sum1 - sum2 ) is odd, then "no solution"
ELSE ...
My method is
1. Move the minus operand to the opposite side, and memorize the
locations of all operators in each side.
2. Count the summation of each side, and count the abs(sum1-sum2).
If
abs(sum1 - sum2 ) is odd, then "no solution"
ELSE ...
- Fri Aug 02, 2002 5:53 pm
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies: 93
- Views: 36410
- Fri Aug 02, 2002 5:48 pm
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies: 93
- Views: 36410
- Fri Jul 19, 2002 2:54 pm
- Forum: Volume 1 (100-199)
- Topic: 158 - Calendar
- Replies: 44
- Views: 15327
- Fri Jul 19, 2002 7:07 am
- Forum: Volume 1 (100-199)
- Topic: 158 - Calendar
- Replies: 44
- Views: 15327
- Wed Jul 17, 2002 5:28 pm
- Forum: Volume 4 (400-499)
- Topic: 492 - Pig-Latin
- Replies: 213
- Views: 49382
- Tue Jul 16, 2002 3:59 am
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58101
- Mon Jul 15, 2002 5:27 am
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies: 93
- Views: 36410
193 something is strange
My algorithem is ...
Form the minimum degree node to the maxmum degree node,
if its all neighbors are not black,it is going to be colored.
Is it wrong ...??...
I can got correct results in many cases,but I got WA,WA,and WA...
Form the minimum degree node to the maxmum degree node,
if its all neighbors are not black,it is going to be colored.
Is it wrong ...??...
I can got correct results in many cases,but I got WA,WA,and WA...
- Mon Jul 15, 2002 3:35 am
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58101
- Sun Jul 14, 2002 3:49 pm
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58101
- Sun Jul 14, 2002 6:38 am
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58101
- Sun Jul 14, 2002 6:30 am
- Forum: Volume 1 (100-199)
- Topic: 139 - Telephone Tangles
- Replies: 66
- Views: 15737
- Sun Jul 14, 2002 6:28 am
- Forum: Volume 1 (100-199)
- Topic: 139 - Telephone Tangles
- Replies: 66
- Views: 15737
- Sat Jul 13, 2002 5:34 pm
- Forum: Volume 1 (100-199)
- Topic: 150 - Double Time
- Replies: 18
- Views: 7799
150 help me
My program got WA...
Can you give me some inputs and outputs ..
Can you give me some inputs and outputs ..