trunc simply removes the fractional part of a number, hence trunc(3.5) = 3 and trunc(-3.5) = -3. But ceil behaves differently for positive and negative numbers: ceil(-3.5) = -3, but ceil(3.5) = 4.
trunc simply removes the fractional part of a number, hence trunc(3.5) = 3 and trunc(-3.5) = -3. But ceil behaves differently for positive and negative numbers: ceil(-3.5) = -3, but ceil(3.5) = 4.
OK I don't get it.
I looked in the wikipedia and it defines the ceil fuction's job as giving the integer of the number closer to 0. It gave the same type of example like 3.5 where it is actually moving away from the 0.
Also, I don't think there is a ceil function in Pascal? Or is there?
OK I don't get it.
I looked in the wikipedia and it defines the ceil fuction's job as giving the integer of the number closer to 0. It gave the same type of example like 3.5 where it is actually moving away from the 0.
Also, I don't think there is a ceil function in Pascal? Or is there?
There is no ceil function in Pascal, to the best of my knowledge. Anyways, so the ceiling of a number x is an integer y that satisfies the following properties:
1. y is greater than or equal to x.
2. There is no smaller value of y that satisfies #1.
For example, ceil(1) = 1, ceil(1.1) = 2, ceil(1.9) = 2, ceil(-1.5) = -1. Basically it's the first integer that you encounter when moving right on the number line.
There is no ceil function in Pascal, to the best of my knowledge. Anyways, so the ceiling of a number x is an integer y that satisfies the following properties: 1. y is greater than or equal to x. 2. There is no smaller value of y that satisfies #1.
For example, ceil(1) = 1, ceil(1.1) = 2, ceil(1.9) = 2, ceil(-1.5) = -1. Basically it's the first integer that you encounter when moving right on the number line.
Just wondering, if the programs that you do count for marks, then how about us (people from Churchill). Will the programs that we've done already count for marks next year?
Just wondering, if the programs that you do count for marks, then how about us (people from Churchill). Will the programs that we've done already count for marks next year?
Points aren't allowed to carry over to the next year. Of course, these problems give you the experience and confidence necessary to solve harder problems, such as the ones on the USACO training webpages.
Points aren't allowed to carry over to the next year. Of course, these problems give you the experience and confidence necessary to solve harder problems, such as the ones on the USACO training webpages.
But, I can barely do anymore programs (at least not with the skills that I have). If you check my submissions, it's been getting increasingly harder to get points, and if I've already done most of the programs that I can do this year, then I have almost nothing I can do next year.
But, I can barely do anymore programs (at least not with the skills that I have). If you check my submissions, it's been getting increasingly harder to get points, and if I've already done most of the programs that I can do this year, then I have almost nothing I can do next year.
But there are other sources of points.
There's [url=http://train.usaco.org]USACO training[/url], [url=http://www.spoj.pl]SPOJ[/url], as well as regular class assignments.
But there are other sources of points. There's USACO training, SPOJ, as well as regular class assignments.
Why not have a little check mark beside questions that you did in other's user pages? It makes comparing who has what program done much more easy.:biggrin:
(*Heh post #100*)
Why not have a little check mark beside questions that you did in other's user pages? It makes comparing who has what program done much more easy. (*Heh post #100*)
I just have a small idea that might help some of us by a lot...
Maybe we could have (point) bonuses if you finish everything from one collection (e.g. SMAC, Woburn Challenge 02, CCC '99)...?
I just have a small idea that might help some of us by a lot...
Maybe we could have (point) bonuses if you finish everything from one collection (e.g. SMAC, Woburn Challenge 02, CCC '99)...?
This probably won't work out too well considering we're doing this for marks and there's no point giving us extra points for something that we would normally do?
This probably won't work out too well considering we're doing this for marks and there's no point giving us extra points for something that we would normally do?
Will they?
I was under the understanding (no pun intended) that these points that we have now were sucked into the void... basically that we would not have them count towards CompSci.
Will they? I was under the understanding (no pun intended) that these points that we have now were sucked into the void... basically that we would not have them count towards CompSci.
Let's say I have 15/20 on What a niche. If I can't finish by today midnight, the point value will be halved. However, I've already earned more than 10 points on the problem. IF I solve it after today midnight, do I still get 20 or do my points drop to 10?
Let's say I have 15/20 on What a niche. If I can't finish by today midnight, the point value will be halved. However, I've already earned more than 10 points on the problem. IF I solve it after today midnight, do I still get 20 or do my points drop to 10?
Would it be nice if you could view other people's submissions for a problem? (once you've solved it, of course)
This would probably make the "Best solutions" page worthless.
But I could output the code as a picture so you can't copy and paste. What do you guys think?
Would it be nice if you could view other people's submissions for a problem? (once you've solved it, of course)
This would probably make the "Best solutions" page worthless. But I could output the code as a picture so you can't copy and paste. What do you guys think?
Due to a small bug, jargon's post has been deleted. Here's the basic idea:
Suppose there are two problems Alpha and Beta. Alpha is worth 5 points and Beta is worth 15 points. Now, suppose Carl and David both solve problem Beta. Carl hasn't figured out an algorithm for Alpha. David, on the other hand, could easily modify his code to make it work for Alpha, but doesn't because he wants to keep his average up. Wouldn't that be like giving points to Carl?
Due to a small bug, jargon's post has been deleted. Here's the basic idea: Suppose there are two problems Alpha and Beta. Alpha is worth 5 points and Beta is worth 15 points. Now, suppose Carl and David both solve problem Beta. Carl hasn't figured out an algorithm for Alpha. David, on the other hand, could easily modify his code to make it work for Alpha, but doesn't because he wants to keep his average up. Wouldn't that be like giving points to Carl?
Generally such occurrences are rare (the only one I can think of is CCC Fractions vs. The Return of the Plachta)
But this site is mostly about learning, and it'd be a good thing if you learned an algorithm by looking at someone else's code. (As long as you don't blindly copy-paste) It's not just about the points.
Generally such occurrences are rare (the only one I can think of is CCC Fractions vs. The Return of the Plachta) But this site is mostly about learning, and it'd be a good thing if you learned an algorithm by looking at someone else's code. (As long as you don't blindly copy-paste) It's not just about the points.
Comments (Search)
This is now implemented.
I looked in the wikipedia and it defines the ceil fuction's job as giving the integer of the number closer to 0. It gave the same type of example like 3.5 where it is actually moving away from the 0.
Also, I don't think there is a ceil function in Pascal? Or is there?
1. y is greater than or equal to x.
2. There is no smaller value of y that satisfies #1.
For example, ceil(1) = 1, ceil(1.1) = 2, ceil(1.9) = 2, ceil(-1.5) = -1. Basically it's the first integer that you encounter when moving right on the number line.
There's USACO training, SPOJ, as well as regular class assignments.
(*Heh post #100*)
Maybe we could have (point) bonuses if you finish everything from one collection (e.g. SMAC, Woburn Challenge 02, CCC '99)...?
I was under the understanding (no pun intended) that these points that we have now were sucked into the void... basically that we would not have them count towards CompSci.
This would probably make the "Best solutions" page worthless.
But I could output the code as a picture so you can't copy and paste. What do you guys think?
Suppose there are two problems Alpha and Beta. Alpha is worth 5 points and Beta is worth 15 points. Now, suppose Carl and David both solve problem Beta. Carl hasn't figured out an algorithm for Alpha. David, on the other hand, could easily modify his code to make it work for Alpha, but doesn't because he wants to keep his average up. Wouldn't that be like giving points to Carl?
But this site is mostly about learning, and it'd be a good thing if you learned an algorithm by looking at someone else's code. (As long as you don't blindly copy-paste) It's not just about the points.