Search found 27 matches

by Juergen Werner
Sun Mar 14, 2004 4:41 pm
Forum: Other words
Topic: Time Limits of World Finals Warmup Contest
Replies: 2
Views: 1745

time limits in contests

Not only that problem, but quite regularly in online contests there are poblems with a tight timelimit that does not allow a - in my opinion - reasonable factor in running time compared to a judge solution.

I understand that the resources for judging are limited and low time limits are needed so ...
by Juergen Werner
Sat Dec 27, 2003 9:26 pm
Forum: C++
Topic: How to skip lines while using cin <<
Replies: 7
Views: 6418

... but be careful if you want to skip lines after using cin << ..., because there is still a newline left.

It might be a good idea - whenever there is a need to read a whole line - to read all lines in whole and then getting the values with istringstream or sscanf, then there is no need to worry ...
by Juergen Werner
Sat Dec 27, 2003 8:38 pm
Forum: Other words
Topic: Editor for the Finals
Replies: 7
Views: 2513

Redhat comes with vim and xemacs (and others), which are not really that new *g* and likely the most commonly used editors (when not working on bigger projects), so I don't really agree that contestants are put under experiments.
These editors have all features that I can imagine being useful in ...
by Juergen Werner
Sun Jun 08, 2003 10:12 am
Forum: C++
Topic: why does this code got Compilation Error
Replies: 3
Views: 2906

I submitted your code above with "#include <stdlib.h>" added and it compiled fine. Maybe you accidently chose C instead of C++ as language...
by Juergen Werner
Sun May 04, 2003 11:50 am
Forum: Other words
Topic: Appeal to acm.uva.es administrators and problemsetters.
Replies: 12
Views: 3326

I think that a classification would give more than a hint and completely take the fun out of problem solving. If just interested in a particular algorithm/issue, I'd rather recommend looking into a textbook. And if someone cares more about programming (than problem solving), he can pick problems ...
by Juergen Werner
Wed Apr 30, 2003 8:54 pm
Forum: C++
Topic: Compile Error
Replies: 3
Views: 2465

Since the judge uses GCC, it could compile it since GCC supports cbrt(), but as far as I know they compile with the '-ansi' option, and cbrt() does not conform to ANSI.


CBRT(3) Linux Programmer's Manual CBRT(3)
...
CONFORMING TO
cbrt is a GNU extension.


cbrt() can be substituted using pow ...
by Juergen Werner
Fri Feb 28, 2003 8:18 pm
Forum: C++
Topic: Input tips (>>, getline, gets) and newlines
Replies: 2
Views: 4348

I"m also no friend of testing for EOF or whatsoever manually (actually never did it - and never needed to). Not only the return value of getline can be used, but e.g. reading int until EOF can be done the following way:


// reading line-wise
string line;
while (getline(cin, line ...
by Juergen Werner
Fri Jan 24, 2003 1:02 pm
Forum: C
Topic: Quick Sort
Replies: 6
Views: 3966

The standard doens't tell what implementation to use for STL sort() and stable_sort(), but for example SGI's implementation uses (as Larry mentioned) introsort for sort() (earlier versions used a 3-median quicksort) and merge sort for stable_sort().


Attached a quote from the SGI STL site ( http ...
by Juergen Werner
Fri Jan 24, 2003 12:51 pm
Forum: Other words
Topic: Problems to appear !!!
Replies: 1
Views: 1229

Well, I don't know when they are going to be added to the judge, but the reason for not being added yet is that there were some 'problems with the problems'. AFAIK, the problem setter for that contest is currently updating some problem descriptions and testcases.
by Juergen Werner
Sun Jan 05, 2003 1:00 am
Forum: Other words
Topic: time trouble
Replies: 1
Views: 1408

Sometimes I wonder why people don't use search engines to get their questions answered quickly (no offense meant).

Go for example to http://www.google.de/ or http://www.yahoo.com/ , search for "utc gmt", follow the first hit ( http://www.dxing.com/utcgmt.htm ), and although that page doesn't list ...
by Juergen Werner
Wed Dec 25, 2002 6:31 pm
Forum: Other words
Topic: What does ouput limit exited mean?
Replies: 1
Views: 1461

http://acm.uva.es/problemset/replies.html

If the judgement was 'Output Limit Exceeded', it means that you wrote to much to stdout (i.e. a lot more then the correct output would be).
by Juergen Werner
Sun Nov 24, 2002 10:25 pm
Forum: Algorithms
Topic: About Dynamic Programming
Replies: 5
Views: 4346

Here you can find an assigment of some online judge problems to several categories (including DP): http://www.cs.sunysb.edu/~skiena/390/hw.html

There are a lot more DP problems on the site (like 531 Compromise), but the ones listed by the link above should do for the beginning.
by Juergen Werner
Sun Nov 24, 2002 10:02 pm
Forum: C
Topic: Multi tasking in C!!
Replies: 1
Views: 2298

What you'd like to do is specific to the operating system, so there is no general way to solve this.

Under Unix/Linux, there is the 'fork()' command that creates a child process (conforming to POSIX, BSD, ...), information on this can be found in the Unix Programming FAQ ( http://www.erlenstar ...
by Juergen Werner
Wed Nov 06, 2002 7:54 pm
Forum: Algorithms
Topic: Longest path
Replies: 5
Views: 5207

I agree with zorbathut, solving the stated problem would solve the Hamilton Path Problem, which is NP-complete.

Discussing this, it might also be interesting to look at a related, yet easy problem: Finding the longest path in an undirected acyclic graph (see 10308 Roads in the North) which can be ...
by Juergen Werner
Tue Nov 05, 2002 12:16 pm
Forum: C++
Topic: ANSI C++ Manual
Replies: 5
Views: 3901

1) As far as I remember, there is an ANSI checkbutton hidden somewhere in a dialog tab for compile options, but it's long time ago that I used VC the last time. I also think that in the online help it is listed to which standard the functions conform to.

If that doesn't help, you could use the ...

Go to advanced search