Ուղարկել | Բոլոր լուծումները | Լավագույն լուծումները | Վերադառնալ ցուցակին |
ACM_0122 - HONEY BEES |
The behavioral activity of worker honey bees can be divided into the following recognizable tasks: resting (Re), patrolling (Pt), Cell-cleaning (Cc), eating pollen (Ea), tending brood (Tb), comb-building and maintenance (Cm), and external activities (Ex) such as guarding, foraging and dance-following.
The tasks carried out by a honey bee were recorded at hourly intervals for a day, resulting in a data set consisting of whitespace separated symbols from the set {Re, Pt, Cc, Ea, Tb, Cm, Ex}.
Input
The input consists of symbols from the set {Re, Pt, Cc, Ea, Tb, Cm, Ex}. The symbols are whitespace separated and could span for several lines. There are at most 24 symbols.
Output
The output is a table consisting of 8 lines. Lines 1 to 7 are values in the following format:
Task Count Proportion
The tasks should be ordered this way: Re, Pt, Cc, Ea, Tb, Cm, and Ex. The count is the total frequency count of the task while proportion is the the frequency count divided by the total number of recorded tasks. The proportion should be rounded off to the nearest hundreths and should show exactly two digits after the decimal point.
The 8th line should always be “Total <total> 1.00” where <total> is the total number of recorded tasks.
Examples
№ |
stdin |
stdout |
1 |
Cc Pt Pt Re Tb Re Cm Cm Re Pt Pt Re Ea Ea Pt Pt Pt Re Re Cb Cb Pt Pt Cb |
Re 6 0.25 Pt 9 0.38 Cc 1 0.04 Ea 2 0.08 Tb 1 0.04 Cm 2 0.08 Ex 0 0.00 Total 24 1.00 |
Ավելացրեց. | Հրանտ Հովհաննիսյան |
Ամսաթիվ. | 2014-02-06 |
Ժամանակի սահմանափակումը. | 1s |
Ծրագրի տեքստի սահմանափակումը. | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Լեզուներ. | Բոլորը բացի ASM32 ASM64 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK NEM NIM OBJC-CLANG PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL WHITESPACE |
Աղբյուրը. | Philippines Multi-Provincial 2013.A |