whos doing DWITE?
Author |
Message |
bugzpodder
|
Posted: Sat Oct 23, 2004 8:37 am Post subject: (No subject) |
|
|
will sentjens has agreed to let me put some of my problems on dwite starting november so be prepared to get pwned!! j/k (just the part about being pwned -- the problems are not tooo difficult, it should be easily accessible to high students - esp massey student 8) , and you might see 2 or 3 problems from me on november though, thats the truth) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Andy
|
Posted: Sat Oct 23, 2004 9:47 am Post subject: (No subject) |
|
|
heh nice... |
|
|
|
|
|
Paul
|
Posted: Sat Oct 23, 2004 5:01 pm Post subject: (No subject) |
|
|
bugzpodder wrote: will sentjens has agreed to let me put some of my problems on dwite starting november so be prepared to get pwned!! j/k (just the part about being pwned -- the problems are not tooo difficult, it should be easily accessible to high students - esp massey student 8) , and you might see 2 or 3 problems from me on november though, thats the truth)
Easy for you to say, Mr. Algorithms |
|
|
|
|
|
shorthair
|
Posted: Sat Oct 23, 2004 7:25 pm Post subject: (No subject) |
|
|
CCH = IN the DWITE
Good luck to those in it
Just like last year , here is how the contest goes , the winnig team will split the bits depending on how many are on hte compsci board
so if CCH won , Shorthair & Sport would split , 500 bits.
Bits go at my discresion , if hte user is inactive on the board then let me know and you can have all hte bits
1st = 500 bits
2nd = 250 bits
3rd = 125 bits
Later Days ,
Beat you all friday |
|
|
|
|
|
bugzpodder
|
Posted: Sat Oct 23, 2004 11:18 pm Post subject: (No subject) |
|
|
seriously though, you will not be needing any "advanced" algorithms to solve my problems. in fact, as mr. sentjens adviced, the problems should be in a way thats accessible to grade 11 students. which means it usually wont have anything that you havent seen in your classes in grade 11 (but including recursion in case thats not taught in grade 11). |
|
|
|
|
|
pluckster
|
Posted: Wed Oct 27, 2004 11:17 am Post subject: (No subject) |
|
|
Me and some of my friends are doing it from Ross in guelph |
|
|
|
|
|
zylum
|
Posted: Wed Oct 27, 2004 8:19 pm Post subject: (No subject) |
|
|
bah! my teacher is a lazy dick, he wont sign my team up because he doesnt want to arrange a substitute for the classes he wont be teaching. i suspect hes just being lazy as usual |
|
|
|
|
|
sport
|
Posted: Wed Oct 27, 2004 10:33 pm Post subject: Dwite |
|
|
We almost missed the registration too. We better win it this time shorthair. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
bugzpodder
|
Posted: Thu Oct 28, 2004 12:59 pm Post subject: (No subject) |
|
|
Simon is pretti good... you need some work to beat him. I managed to do that with AsianSensation's help |
|
|
|
|
|
Andy
|
Posted: Thu Oct 28, 2004 5:12 pm Post subject: (No subject) |
|
|
wait when was this? |
|
|
|
|
|
zylum
|
Posted: Thu Oct 28, 2004 9:10 pm Post subject: (No subject) |
|
|
yay, i got another teacher to sign us up! he did it today and we still made it well good luck to you all tomorrow! |
|
|
|
|
|
bugzpodder
|
Posted: Thu Oct 28, 2004 9:24 pm Post subject: (No subject) |
|
|
dodge_tomahawk wrote: wait when was this?
is that addressed to me? last dwite. btw the massey team looks good. I just hope mr Sentjens uses my questions next time. i sent them in last week and he havent given me responses yet. |
|
|
|
|
|
bugzpodder
|
Posted: Fri Oct 29, 2004 11:46 am Post subject: (No subject) |
|
|
Hmm Aidin and Simon are pretti fast. half way in and they are almost done (dont know whats happening with question 3)
and dodge, wth is all those "Input/Output file not found" in your submissions for Q1!! |
|
|
|
|
|
zylum
|
Posted: Fri Oct 29, 2004 3:11 pm Post subject: (No subject) |
|
|
man that contest was so damn easy. too bad we had problems with submitting... i finished all problems in about 40 minutes but my teacher had gone off somewhere and we couldnt submit the solutions untill an hour and a half into the contest... then we submitted all the problems at once (thats why the scores are similar) but for some reason they werent accepting solutions for 2 and 4.. i dunno, we emailed the guy and he said he couldnt open the files or something. meh if those 2 were accepted we could have had a score of around 625 putting us in second and if we were able to submit them at the time we had finished them we would have probably finished in fourth...
here are the solutions for my 2 and 4.... they worked on the computer i was using and passed all test that i threw at it so im sure it would have passed if it we didnt have those problems:
P2:
code: | var file : int
var out : int
var input : string
var output : string
open : file, "DATA2", get
open : out, "OUT2", put
loop
exit when eof (file)
get : file, input
var hours : int := strint (input (1 .. 2))
var minutes : int := strint (input (4 .. 5))
var half : char
var HH: string
var MM: string
if (hours > 12) then
hours := hours - 12
half := "P"
elsif (hours = 12) then
half := "P"
else
half := "A"
end if
if (minutes <10) then
MM := "0" + intstr(minutes);
else
MM := intstr(minutes);
end if
HH:= intstr(hours)
output := HH + ":" + MM + " " + half + "M"
put : out, output
end loop |
P4:
code: | var file : int
var out : int
open : file, "DATA4", get
open : out, "OUT4", put
var MAX : int := 0
var ret : int := 0
var temp : int := 0
var numF : int
var maxSize : int
var files : flexible array 1 .. 0 of int
var bMask : string
function intToBin (n, l : int) : string
var num : int := n
var bin : string := ""
for i : 1 .. l
bin := intstr (num rem 2) + bin
num := num div 2
end for
result bin
end intToBin
loop
ret := 0
exit when eof (file)
get : file, MAX
get : file, numF
new files, 0
new files, numF
for i : 1 .. numF
get : file, files (i)
end for
for i : 1 .. 2 ** numF - 1
bMask := intToBin (i, numF)
temp := 0
for j : 1 .. numF
if bMask (j) = "1" then
temp := temp + files (j)
end if
end for
if temp <= MAX and temp > ret then
ret := temp
end if
end for
put : out, ret
end loop |
we were using turing 4.1 but i dont think i used anything that wouldnt be compatible with turning 3...
also, it seems lots of people were having trouble with the 3rd problem... i dont know why because it seemed to be one of the easier ones. i was one of two teams that got perfect for that one |
|
|
|
|
|
Andy
|
Posted: Fri Oct 29, 2004 5:17 pm Post subject: (No subject) |
|
|
haha we did number four the same way... i guess most ppl did that way instead of recursion |
|
|
|
|
|
|
|