Sample Outputs for COMP115 (1 Viewer)

toknblackguy

Member
Joined
Nov 1, 2003
Messages
299
Gender
Male
HSC
2003
someone who has a proper working program...
could you please post up some sample outputs?
cause i keep getting different ones to those on the comp site, but apparently it's ok, because they;re still correct ??

thanks
 

boinkBOINK

hustler
Joined
Feb 5, 2003
Messages
862
Gender
Undisclosed
HSC
N/A
number of values 5
pairsum 10
values 6 7 8 5 1
inversion number 7
no majority
no paris which sum is 10
subsequence with max sum 21 is 6 7 8

number of values 8
pairsum 12
values 9 4 -2 -3 5 -7 6 -4
inversion number 19
no majority
no paris which sum is 12
subsequence with max sum 21 is 9

got any values u want me to test?
 
Last edited:

toknblackguy

Member
Joined
Nov 1, 2003
Messages
299
Gender
Male
HSC
2003
whoa
dude
ur things are all wrong (i think ;) ) !!
first eg: subseqence with max sum is the entire sequence!

sceond one, the goal pair sum was 12, and ugot no pairs which sum to 11, and then max subsequence with sum of 21 is 9??
wtf? wouldn't it be 9 and 4?
 

boinkBOINK

hustler
Joined
Feb 5, 2003
Messages
862
Gender
Undisclosed
HSC
N/A
oops the goal pairsum bit was a typo
my bad

what values do u want me to test out then?
cause atm for all the sample values mine works
 

toknblackguy

Member
Joined
Nov 1, 2003
Messages
299
Gender
Male
HSC
2003
it's all good
i think mine works
but why not try 10 values
10 pair sum
1 1 1 1 1 1 2 2 2 2
i get inversion = 0
majority is 1
no goal sum thing
subsequence is the whole sequence
 

boinkBOINK

hustler
Joined
Feb 5, 2003
Messages
862
Gender
Undisclosed
HSC
N/A
with your values there
i got uhm
inversion is 0
majority is 1
no pair sums
subsequence with max 14 is all those numbers
 

jlh

sooner or later...
Joined
Mar 15, 2003
Messages
1,755
Location
Sydney
Gender
Male
HSC
2002
yeah i got the same result as toknblackguy...

the subsequence can be the whole sequence...


i guess me posting now would be pointless since it was due last night!! :S
 

toknblackguy

Member
Joined
Nov 1, 2003
Messages
299
Gender
Male
HSC
2003
REMEMBER TO TURN UP TO YOUR PRACTICALS
there are no second chances with this one!
 

jlh

sooner or later...
Joined
Mar 15, 2003
Messages
1,755
Location
Sydney
Gender
Male
HSC
2002
were there second chances for the other ones?
 

...

^___^
Joined
May 21, 2003
Messages
7,723
Location
somewhere inside E6A
Gender
Male
HSC
1998
Originally posted by toknblackguy
REMEMBER TO TURN UP TO YOUR PRACTICALS
there are no second chances with this one!
bah, its easy
manual marking was only out of 2marks

one for elegance
another for indentation(or commenting i think)
 

redruM

Breathe and Stop
Joined
May 11, 2004
Messages
3,954
Gender
Male
HSC
2003
if you missed out. just check the timetable and go into another practical during the week.

i got 2. your code can be absolutely wrong, and you can still get 2/9!

1 for documentation, intrinsic and internal.
1 for elegance.
 

jlh

sooner or later...
Joined
Mar 15, 2003
Messages
1,755
Location
Sydney
Gender
Male
HSC
2002
hahahaha. yeah they very lenient at marking this time..

i submitted my draft, after having an unfortunate incident with my good copy... my draft had comments like // end loop, // end if statement and most of it was aligned.. but she didn't even scroll to see the whole thing and just gave me 2...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top