MPGH Coding Contest!

Posts 46–60 of 62 · Page 4 of 5
Quote Originally Posted by B1ackAnge1 View Post
1-4 is nothing more than read from file, parse data, calculate.
5 is basically the same thing, but you have to come up with a pathfinding algorithm
So i'm sure you could do those right now - get to it man!
I'm trying to go for style points. For my first one I did a recursive loop. tried to do something similar here and got such a crazy errors it was beyond my comprehension to understand. When you end up making an infinite loop with recursion things get bad really quick. And the weird thing is the error only occured when I tried to error check it by putting in cout statements. it would cause some kind of infinite recursive loop. @_@.

So I threw that out and whipped up something simple in about 10 min, but you should see my first one. I don't think even you could understand it at first glance BA. =)

@Ahrk: get off the anime and listen to real music atleast -__-.
Just keep it simple why - Simple & clean is always the best style...
If you want my code just shoot me an email! (it's a real mess haha)
Quote Originally Posted by B1ackAnge1 View Post
Just keep it simple why - Simple & clean is always the best style...
If you want my code just shoot me an email! (it's a real mess haha)
But Im an expert at over-complication...
Ya know - this could all be a simply ruse to do someone's homework for them
Quote Originally Posted by B1ackAnge1 View Post
Ya know - this could all be a simply ruse to do someone's homework for them
damn u zhaoyun. damn u! >;l
Ok guys LOL the first question was a simple for loop you dont even need to recurss why06 o.O

OK EVERYONE PAY ATTENTION TO THIS: THE FILE HAS 5 TEST CASES NOT ONE SO DONT JUST EXIT IT. I will let everyone resubmit since every1 screwed up on that. Output 5 lines for each of the 5 test cases.

For number 4: you have to find the total minimum distance from all the clients to ther server and output the location of the server. Hint it is not the average.
Eg: clients 1,2,6,7,8.
If you place the server at 4.8 the total distance between the server and clients are:
3.8+2.8+1.2+3.2+ 4.2=14.2
but if you place the server at 6:
5+4+0+1+2=12

1-4 should be simple but 5 takes some thinking.

Can everyone submit their code with only the .cpp file not the entire project? *cough* BA *cough* xD it easier to mark this way.
Everyone screwed up? I'd say the spec was lacking if it's that consistent where everyone interprets it 'wrong'. Especially regarding #4 since your latest explanation sounds nothing like what was in the first post (at least to me).

Re. the source: "Only the cpp file" would imply all the code is only in one cpp file, which in my case it's not.. (actually structured things in classes , enums, header files and other Cpp files (mainly in #5, others are at least split in .h & cpp). Are you looking to compile & run or just look at the code?


Not sure I care enough to go make changes
Quote Originally Posted by zhaoyun333 View Post
OK EVERYONE PAY ATTENTION TO THIS: THE FILE HAS 5 TEST CASES NOT ONE SO DONT JUST EXIT IT. I will let everyone resubmit since every1 screwed up on that. Output 5 lines for each of the 5 test cases.
wut??? 5 test cases????

ty for the explaination on 4.

after working like 2 hours on program 3 and finishing it.
I read the question again and discovered that I mad a whole different program.

@why: LoL recursive..... where do you want to make something recursive????
Sample Input 1:
2
0
2

Sample Output 1:
Server will be located at 1.
isn't this wrong?

if the server is placed at 2 then the length of cable will be 4.
(from 2 to 0 and back)

if it will be placed at 1 the total length will be 6

2 times (2 to1 and back)=2 * 2 =4
+
from 0 to 1 and back = 2
Hmmmm, sounds like someone has a project do and needs others to write it for him
Agree with that BA. You did not specify the 1st file would hold more then one sample. You need to be more specific. Especially when it comes to file format. =/

The recursion was for fun btw. I know it wasn't necessary.

@Next: Lol well if so he's gonna get a bunch of non-working code xD.
I think it's ingenious, I wish I had MPGH when I was in school

"ok teacher, so this project is do on April 16th, okay and is there any way you can email the specifications "

New Topic

- VB.NET Contest

" You all have till April 15th to get me , I mean , to submit a 500 px by 500px form that displays (without access) remote desktop from inside your network.

:Copy Instructions from email: :Paste:

/Win

Muhahahahahahahahah

Sorry for "Spamming", (though really it's /on topic) and I am Just kidding
He probably thinks he's gonna get away with it but his teacher might be a MPGH troll...
~
If there are 2 servers at 2 and only one at 0 place server at 2 and the length will only be 2.
Quote Originally Posted by why06 View Post
If there are 2 servers at 2 and only one at 0 place server at 2 and the length will only be 2.
explaination plz....
Posts 46–60 of 62 · Page 4 of 5
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us