Under construction

Still being built. Things may change

Pantun Grader

Time limit1sMemory limit256 MB

Summary
Score the first four verses of each pantun on syllable count, rhyme pairs and matching lengths, then subtract penalties for extra verses.
Level

Easy3 of 10

Topics
String, Implementation, Simulation
Solved
No attempts yet

Problem

Score the first four verses of a pantun: syllable marks (8-12 syllables), rhythm pairs (last two letters of last word), matching syllable counts, and 10-point penalty per extra verse.

Input

Test count NN, then pantun lines with verses separated by commas and ending with a period.

Output

Print Case #X: A B C D E for syllable, rhythm, matching syllable, penalty, and total points.

Examples2

  1. Example 1

    Input
    3
    Dua tiga kucing berlari, Mana nak sama si kucing belang, Dua tiga boleh kau cari, Mana nak sama aku seorang.
    Banyak udang banyak garam, Banyak orang banyak ragam.
    Aku kau, Dia saya, Aku kau, Dia saya, Aku kau, Dia saya.
    
    Expected output
    Case #1: 40 40 20 0 100
    Case #2: 20 0 0 0 20
    Case #3: 0 40 20 20 40
    
  2. Example 2

    Input
    1
    Banyak udang banyak garam, Banyak orang banyak ragam.
    
    Expected output
    Case #1: 20 0 0 0 20