Yes, it's back. See the attached sheet. (For Nausicaa fans, `Solve it and you'll be famous!' ... actually, the big problem archive reports that eight people have already solved it.)
Nobody wanted to parse mathematical expressions in infix form when `A Terminal Math Problem' was on a contest, so postfix expressions will be used instead.
The problem: integrate f(x) from a to b with an error tolerance of 0.01.
Each input line consists of two floating point values (a and b) followed by f in RPN (with spaces between tokens, the variable x and the operators +-*/^). The function f(x) will be continuous on the given range.
For each integration, output the the result with two decimal places, accurate within 0.01.
1 3 -1.0 0 1 x 1 - x 1 + / -1.5 1.5 2.718281828 0 x 2 ^ - ^
-2.00 -0.39 1.71
Take two lines of input and produce a sorted list of all of the maximal common substrings. That is to say, if the input strings are X and Y (drawn from the set Sigma*), produce a list of all x such that x is a substring of both X and Y, but for all s in Sigma, neither sx nor xs is a substring of both X and Y.
hi,_how_are_you_today? fine,_thank-you_very_much.
,_ _t a e h i r you_
Write a program that takes a regular expression and zero or more lines of text as input. The program will print `yes' for each line of text that matches the regular expression and `no' for the others.
The expressions will correspond to the following grammar:
E => C | C `|' E C => B | B C B => S `*' | S S => `(' E ')' | L L => any lower-case letter
foo|a(aa)*b foo foab aaab aab ab xaaaby
yes no yes no yes no
#!/bin/sh cat $0
(Well, not quite....)