-
Notifications
You must be signed in to change notification settings - Fork 2
/
calfflac.html
68 lines (55 loc) · 2.15 KB
/
calfflac.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
<head> <title>Problem 52: Calf Flac</title> </head>
<body background="/usaco/bg3.jpg">
<img src="/usaco/cow1.jpg" width="742" height="118">
<center>
<b><font size="7">Calf Flac</font></b><br>
</center>
<p> It is said that if you give an infinite number of cows an infinite
number of heavy-duty laptops (with very large keys), that they will
ultimately produce all the world's great palindromes. Your job will be
to detect these bovine beauties.
<p> Ignore punctuation, whitespace, numbers, and case when testing
for palindromes, but keep these extra characters around so that you
can print them out as the answer; just consider the letters `A-Z'
and `a-z'.
<p> Find the largest palindrome in a string no more than 20,000
characters long. The largest palindrome is guaranteed to be at most
2,000 characters long before whitespace and punctuation are removed.
<h3>PROGRAM NAME: calfflac</h3>
<h3>INPUT FORMAT</h3>
A file with no more than 20,000 characters. The file has one or
more lines which, when taken together, represent one long string.
No line is longer than 80 characters (not counting the newline at
the end).
<h3>SAMPLE INPUT (file calfflac.in) </h3>
<pre>
Confucius say: Madam, I'm Adam.
</pre>
<h3>OUTPUT FORMAT</h3>
<p>The first line of the output should be the length of the longest
palindrome found. The next line or lines should be the actual text
of the palindrome (without any surrounding white space or punctuation
but with all other characters) printed on a line (or more than one
line if newlines are included in the palindromic text). If there
are multiple palindromes of longest length, output the one that
appears first.
<h3>SAMPLE OUTPUT (file calfflac.out)</h3>
<pre>
11
Madam, I'm Adam
</pre>
<br>
<hr>
<form action="/upload3" enctype="multipart/form-data" method="POST">
<B>Submission file Name:</B> <input type="file" NAME="filename">
<input type="submit" VALUE="Send it in!">
<input type="hidden" name="a" value=HDWlekCsDuT>
<input type="hidden" name="S" value=calfflac>
</FORM>
<center>
<a href="/usacogate?a=HDWlekCsDuT"> USACO Gateway </a> |
<a href="mailto:kolstad@ace.delos.com">Comment or Question </a>
</center>
</body>
</html>