Join 99,790 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,577 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
At 10:00PM EDT (GMT-4) four problems will be posted in the "48 Hours of Code" thread. Solutions will be submitted via a file upload form, or alternate email address. The upload URL and Email address will be provided at the same time problems are announced. Below are the guidelines for submitting solutions:
Only 1 Submission Per Problem (No Corrections Accepted)
Submission should be in .zip or .tar.gz format and include the following:
A text (info.txt) file with your member name, compiler and language used (including version), and problem name
Original source (not compiled)
The following file naming convention MUST be followed so that we can test your program: Input: probX.dat Output: membername_probX.out (Where X is your problem number, 1 to 4.)
You may use any language that supports file input/output and line-by-line file parsing. Some possible languages include: PHP, C++, C, C#, ASP, ASP.NET, VB, VB.NET, Java, and Perl.
The winner will be determined by the number of problems correctly solved. In the case of a tie, the total time spent on all submitted problems will break the tie.
Example: Competitor 1 submits correct solutions to problems one, two, and four at 180, 540, and 1380 minutes after the start of submissions. His score is 3 problems correct with a time penalty of 2100 minutes. Competitor 2 submits correct solutions to problems two, three, and four at 300, 540, and 1320 minutes after the start of submissions. His score is 3 problems correct with a time penalty of 2160 minutes. Competitor 1 will thus place higher than competitor 2.
This three-piece multimedia speaker system is designed for consumers who want true high-fidelity sound but do not require or have the space for a multi-speaker surround setup.
The GMX A-2.1 system is available in 120 and 230 volt versions and delivers dynamic sound from any audio source, including iPods, PCs, CD, DVD and MP3 players, game consoles, laptops, television sets and VCRs. By combining high-performance audio, visual appeal and functionality, the A-2.1 is an ideal audio solution for today's multimedia and gaming entertainment devices.
Features include:
* Two-identical magnetically shielded satellite speakers with two-way design: 3-inch woofers and Klipsch's exclusive MicroTractrix® horns; ball joint pedestal mounts that allow them to be aimed securely in almost any direction with just a twist of the hand. * Subwoofer with 75-watt amplifier * Control pod with two stereo inputs: one dual RCA, one 1/8" minijack, headphone output, power button, and master volume control * superlative dynamic output of 108 dB for music, games, and movies * wide response from 30-20,000Hz +- 5 dB
The Klipsch ProMedia GMX line is aimed to draw you into the experience. With the coolest industrial design and the killer performance Klipsch is known for, ProMedia GMX A 2.1 will change the way your life sounds. Surrender to the system.
The replies in this thread have been split off into their own topic so discussion of the competition can be had all weekend, this thread will contain all of the problem set and content info for submission beginning tonight at 10est. feel free to reply in the discussion thread or pm me if you have any questions. good luck to everyone!
A palindrome is a word or phrase that reads the same backwards as forwards. A word example is 'anna', while an example of a palindromic phrase is 'Too bad, I hid a boot'. Palindromes take only the letters into account.Punctuation, case, and spaces are not considered.
Given a list of words and/or phrases, the submitted program or script should be able to analyze the list and identify any palindromes within it. For each palindrome identified, the program or script should also identify if the palindrome is a perfect palindrome, such as 'anna' (all letters have a corresponding repeat), or an odd palindrome, such as 'anana' (the word or phrase contains one letter that does not have a corresponding repeat). The identified palindromes and their respective types should be output to a text file.
Input
A text file of words and phrases. Each word or phrase will be on it's own line within the file.
Output
A text file of words and phrases that have been successfully identified as palindromes. Accompanying each identified palindrome should be an indicator of it's type, in the format of palindrome - type. There should be one palindrome - type combination per line.
Sample Input:
Programming is fun Bar crab industrial waste anna bacon, no Cab
Sample Output
Bar crab - odd anna - perfect bacon, no Cab - perfect
The submitted program or script will be tested using a file containing between 50 and 150 words and phrases. Execution will be timed, although execution time is not the sole factor in scoring.
File provided is a sample only...this is not the file that will be used for testing.
Attached File(s) prob1.dat ( 454bytes )
Number of downloads: 159
Your company's flagship product is an automated letter handler. Among many other features, it can automatically address and weigh any size envelope. One feature that it is missing is efficient postage calculations. Part of this feature is determining the best set of stamp denominations to be provided. You've been given this task.
The size of the envelope limits how many stamps it can accomodate. For example, if 1 cent and 4 cent stamps are available, all postage from 1 to 10 cents can be affixed to an envelope that has space for 4 stamps:
Although three 4 cent stamps yields and envelope with 12 cents postage, you cannot fit enough stamps on the envelope to provide 11 cents postage. Thus, for this set of stamp denominations, you will report that it has a maximum no-gap range from 1 to 10 cents postage. We will call the size of this range the "coverage" of this set. In this case, the coverage is 10 cents.
Input
Input is split into multiple sets of data to be tested against one size of envelope.
* The first line of a test case specifies S, the maximum number of stamps that will fit on an envelope. * The second line specifies N, the number of stamp denomination sets that are to be tested. For example, the above description of 1 cent and 4 cent stamps comprise one set of stamp denominations. * The next N lines contain sets of stamp denominations, one per line. The first number in each line is the number of denominations in the set, followed by the denominations in order from smallest to largest, separated by spaces. There will be no more than S denominations in a single set. * The maximum value of S is 10; the largest denomination is 100 cents; and the maximum value of N is 10. * The input is terminated by a test case beginning with zero (in other words, S is zero).
Output
Output one line for each test case. This line should specify the size of the largest coverage among all sets of denominations in that test case, followed by the corresponding set of denominations. All values should be separated by spaces.
If more than one set of denominations in a test case results in the same size coverage, the set with the smallest number of denominations should be printed. If both the coverage and denomination set size are the same, then the set with the lower maximum denomination should be printed. For example, given an envelope of size 5, denomination sets of 1, 4, 12, 21 and 1, 5, 12, 28 both yield coverage of 71 cents. Thus, the first set should be printed because its largest denomination is 21, while the other set's larget denomination is 28.
If the coverage size, denomination set size, and largest denomination are the same, then any of the sets may be printed.
A prototype for an experimental power reactor is being constructed in orbit. The reactor runs off of energy power cells that need a good deal of power to activate, but give off tremendous power once they have been engergized.
Your job as a research technican is to write a program to simulate the reactor so that the optimum configuration can be found.
The reactor consists of a grid of firing stations. Each station has a number of energy power cells, an energy beam emitter, and collection dish.
Each station has a number of other stations in its firing arc that will receive a beam of energy when the station fires. When a station recieves an energy beam in its collection dish, 1 energy power cell is activated and consumed, and the beam emitter is fired at all stations in its view. When a station recieves a beam and has no energy power cells to activate, it does nothing. When a station recieves multiple beams at the same time it will only discharge one energy power cell. A station with no targets will fire and consume an energy power cell when it is activated by another station, but its beam will not activate other stations.
One station in the reactor will be the "control station" where the inital charge will be generated to start the chain reaction.
Your task is to find how many energy power cells are consumed in the chain reaction.
Input
The input consists of multiple reactor configurations, each with multiple stations. A reactor configuration follows this format:
* An integer showing the station number, followed by a space. * An integer showing the number of energy power cells, followed by a colon. * A space-separated list of the stations at which this station will fire. If a station has no targets, the list of target stations will contain no characters. * A line reading "POWER" followed by another blank line indicates the end of the reactor configuration.
The first station in the list is the control station and is discharged first.
Output
One integer per reactor configuration (one per line) showing the number of energy power cells consumed in the simulation.
Bad news - the contractor you hired to build your new house was a little less than competent. He took a few...artistic liberties during construction. As it turns out, only part of the building is actually enclosed. "Cheap air conditioning," he called it.
Luckily, he did provide you with a revised blueprint. Using this blueprint, your task is to find the total area enclosed on all sides by walls in the finished house.
Input
The input consists of multiple blueprints, each separated by a blank line. The first line of a blueprint specifies the height H and width W of the blueprint, separated by a space. The next H lines describe the blueprint. The character 'x' represents a unit of wall, and the character '.' represents unit of ground.
No height or width will exceed 100 units.
Output
One line per blueprint specifying the total enclosed area.