Count diamonds level 3

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Count the number of diamonds in each ten lines segment.
This's the last one of the serise.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

----------------------------------------
                                        
     *                                  
    * *                                 
   *   *                                
    * *                                 
     *                                  
                                        
                                        
                                        
                                        
----------------------------------------
                                        
                                        
                       *                
                      * *               
     *               *   *              
    * *               * *               
   *   *               *                
    * *                                 
     *                                  
                                        
----------------------------------------
                                        
                                        
    *                    *              
   * *                  * *             
  *   *                *   *            
   * *                  * *      *      
    *                    *      * *     
                               *   *    
                                * *     
                                 *      
----------------------------------------
      *    *      *       *         *   
  *  * *  * *    * *     * *       * *  
 * *  *    *  *   *       *         *   
  *          * *   *              *     
      *       *   * *       *    * *    
     * *           *       * *    *     
 *    *                *    *   *     * 
* *    *    *     *   * *      * *   * *
 *    * *  * *   * *   *        *     * 
       *    *     *                     
----------------------------------------
 *   *              *               *   
* * * *  *         * *             * *  
 *   *  * *       *   *             *   
         *         * *                  
                    *        *          
                            * *         
  *                          *          
 * *   *    *          *              * 
  *   * *  * *        * *            * *
       *    *          *              * 
----------------------------------------
  *   *    *      *    *   *        *   
 * * * *  * *    * *  * * * *      * *  
  *   *    *  *   *    *   *        *   
             * *     *            *     
      *       *     * *      *   * *    
     * *             *      * *   *     
 *    *          *           *        * 
* *         *   * *      *           * *
 *         * *   *      * *           * 
            *            *              
----------------------------------------
                                    *   
                                   * *  
                   *                *   
                  * *                   
                 *   *       *          
                  * *       * *         
  *                *         *          
 * *        *                           
  *        * *                          
            *                           
----------------------------------------
                                        
                                        
                                        
 *                                      
* *                                     
 *                                      
                                        
                                        
                                        
                                        
----------------------------------------
                                        
                                        
                                        
                                        
    *                                   
   * *                   *              
    *                   * *             
                         *       *      
                                * *     
                                 *      
----------------------------------------
                                        
    *                                   
   * *                                  
    *                                   
                  *                     
                 * *         *          
                  *         * *         
       *                     *          
      * *                               
       *                                
----------------------------------------
                  *       *         *   
      *          * *     * *       * *  
     * *      *   *       *         *   
      *      * *    *             *     
              *    * *       *   * *    
       *            *       * *   *     
 *    * *   *                *       *  
* *    *   * *   *        *         * * 
 *          *   * *      * *         *  
                 *        *             
----------------------------------------
  *   *    *   *   *   *    *    *    * 
 * * * *  * * * * * * * *  * *  * *  * *
  *   *    *   *   *   *    *    *    * 
              *    *    *               
             * *  * *  * *   *          
       *      *    *    *   * *         
 *    * *            *       *        * 
* *  *   *       *  * *  *           * *
 *    * *       * *  *  * *           * 
       *         *       *              
----------------------------------------
                        *               
    *                  * *              
   * *                  *               
    *                                   
       *          *          *          
      * *        * *        * *         
       *          *          *          
                                      * 
                                     * *
                                      * 
----------------------------------------
  *   *    *      *    *   *        *   
 * * * *  * *    * *  * * * *      * *  
  *   *    *      *    *   *        *   
                   *              *     
      *       *   * *        *   * *    
     * *     * *   *        * *   *     
 *    *       *              *        * 
* *         *    *       *           * *
 *         * *  * *     * *           * 
            *    *       *              
----------------------------------------
                                        
    *                                   
   * *                                  
    *                                   
                  *          *          
                 * *        * *         
                  *          *          
       *                                
      * *                               
       *                                
----------------------------------------
                                    *   
     *                             * *  
    * *                             *   
     *             *                    
                  * *        *          
                   *        * *         
  *      *                   *          
 * *    * *        *                    
  *      *        * *                   
                   *                    
----------------------------------------
                                   *    
                                  * *   
                                   *    
                   *                    
                  * *        *          
                   *        * *         
  *                          *          
 * *        *                           
  *        * *                          
            *                           
----------------------------------------
                                        
                                        
                                        
                   *                    
                  * *                   
                   *                    
                                        
                                        
                                        
                                        
----------------------------------------
 *   *    *                             
* * * *  * *                            
 *   *  *   *                           
         * *                            
          *                             
                                        
                                        
                                        
                                        
                                        
----------------------------------------
  *   *    *      *       *         *   
 * * * *  * *    * *     * *       * *  
  *   *    *  *   *       *         *   
             * *   *              *     
      *       *   * *        *   * *    
     * *           *        * *   *     
 *    *                      *        * 
* *         *    *      *            * *
 *         * *  * *    * *            * 
            *    *      *               
----------------------------------------

Sample output:

1
2
3
18
11
17
5
1
3
4
14
19
6
17
4
7
5
1
3
16

Sample input:_

----------------------------------------
  *        *        *        *        * 
 * *      * *      * *      * *   *  * *
  *    *   *        *        *   * *  * 
      * *              *          *     
     *   *            * *               
      * *      *       *    *     *     
       *      * *          * *   * *    
  *        *   *    *     *   *   *   * 
 * *      * *      * *     * *       * *
  *        *        *       *         * 
----------------------------------------
                                        
    *                              *    
   * *                            * *   
    *                              *    
                  *                     
                 * *                    
                  *                     
       *                                
      * *                               
       *                                
----------------------------------------
  *   *    *      *    *   *        *   
 * * * *  * *    * *  * * * *      * *  
  *   *    *  *   *    *   *        *   
             * *   *              *     
      *       *   * *        *   * *    
     * *           *        * *   *     
      *     *                *        * 
 *         * *   *       *           * *
* *         *   * *     * *           * 
 *               *       *              
----------------------------------------
 *         *        *        *        * 
* *       * *      * *      * *   *  * *
 *         *        *        *   * *  * 
       *               *          *     
      * *             * *               
       *       *       *          *     
              * *                * *    
  *        *   *    *        *    *   * 
 * *      * *      * *      * *      * *
  *        *        *        *        * 
----------------------------------------
                                    *   
     *                             * *  
    * *                           *   * 
     *             *               * *  
                  * *        *      *   
                   *        * *         
  *                          *          
 * *   *           *                    
  *   * *         * *                   
       *           *                    
----------------------------------------
                  *      *          *   
      *      *   * *    * *        * *  
     * *    * *   *      *          *   
      *      *                    *     
                             *   * *    
       *                    * *   *     
 *    * *   *                *       *  
* *    *   * *   *       *          * * 
 *          *   * *     * *          *  
                 *       *              
----------------------------------------
  *        *       *         *        * 
 * *      * *     * *       * *      * *
  *        *       *         *        * 
                                        
                                        
                                        
                                        
  *        *         *       *        * 
 * *      * *       * *     * *      * *
  *        *         *       *        * 
----------------------------------------
  *   *    *      *    *   *        *   
 * * * *  * *    * *  * * * *      * *  
  *   *    *  *   *    *   *        *   
             * *   *              *     
      *       *   * *        *   * *    
     * *           *        * *   *     
 *    *                      *        * 
* *         *    *       *           * *
 *         * *  * *     * *           * 
            *    *       *              
----------------------------------------
  *        *        *        *        * 
 * *      * *      * *      * *   *  * *
  *        *        *        *   * *  * 
       *               *          *     
      * *             * *               
       *       *       *          *     
              * *                * *    
  *        *   *    *        *    *   * 
 * *      * *      * *      * *      * *
  *        *        *        *        * 
----------------------------------------
  *   *    *   *   *   *    *       *   
 * * * *  * * * * * * * *  * *     * *  
  *   *    *   *   *   *    *       *   
              *    *    *         *     
             * *  * *  * *   *   * *    
      *       *    *    *   * *   *     
 *   * *             *       *        * 
* *   *         *   * *  *           * *
 *             * *   *  * *           * 
                *        *              
----------------------------------------
                                        
    *                                   
   * *                                  
    *                                   
                  *          *          
                 * *        * *         
       *          *          *          
      * *                               
       *                                
                                        
----------------------------------------
      *    *      *       *         *   
  *  * *  * *    * *     * *       * *  
 * *  *    *  *   *       *         *   
  *          * *   *              *     
      *       *   * *        *   * *    
     * *    *      *        * *   *     
 *    *    * *         *     *  *     * 
* *    *    *    *    * *      * *   * *
 *    * *       * *    *        *     * 
       *         *                      
----------------------------------------
                                    *   
     *                             * *  
    * *                             *   
     *          *                       
               * *           *          
                *           * *         
  *                          *          
 * *   *           *                    
  *   * *         * *                   
       *           *                    
----------------------------------------
                  *       *         *   
      *          * *     * *       * *  
     * *      *   *       *         *   
      *      * *   *              *     
              *   * *        *   * *    
       *           *        * *   *     
 *    * *   *                *       *  
* *    *   * *    *      *          * * 
 *          *    * *    * *          *  
                  *      *              
----------------------------------------
                        *               
    *                  * *              
   * *                  *               
    *                                   
                 *            *         
                * *          * *        
                 *            *         
       *                              * 
      * *                            * *
       *                              * 
----------------------------------------
                  *       *         *   
      *          * *     * *       * *  
     * *      *   *       *         *   
      *      * *   *              *     
              *   * *        *   * *    
       *           *        * *   *     
 *    * *   *                *       *  
* *    *   * *   *     *            * * 
 *          *   * *   * *            *  
                 *     *                
----------------------------------------
                                    *   
     *      *                      * *  
    * *    * *                      *   
     *      *                           
                   *    *    *          
                  * *  * *  * *         
  *                *    *    *        * 
 * *    *                            * *
  *    * *                            * 
        *                               
----------------------------------------
  *   *    *   *   *   *   *        *   
 * * * *  * * * * * * * * * *      * *  
  *   *    *   *   *   *   *        *   
                                  *     
      *            *         *   * *    
     * *          * *       * *   *     
 *    *            *         *        * 
* *         *    *       *           * *
 *         * *  * *     * *           * 
            *    *       *              
----------------------------------------
                                        
                                        
                       *                
                      * *               
                       *                
                                        
                       *                
                      * *               
                       *                
                                        
----------------------------------------
      *    *      *       *         *   
  *  * *  * *    * *     * *       * *  
 * *  *    *  *   *       *         *   
  *          * *    *             *     
      *       *    * *       *   * *    
     * *    *       *       * *   *     
 *    *    * *         *     *  *     * 
* *    *  *   *  *    * *      * *   * *
 *    * *  * *  * *    *        *     * 
       *    *    *                      
----------------------------------------

Sample output:

15
4
17
15
7
13
10
17
15
19
4
18
7
14
6
14
9
17
2
18

Sample input:_

----------------------------------------
                                        
                                        
    *                                   
   * *                                  
    *                    *              
                        * *             
                         *              
                                 *      
                                * *     
                                 *      
----------------------------------------
      *           *       *         *   
     * *         * *     * *       * *  
    *   *     *   *  *    *         *   
     * *     * *    * *           *     
      *       *      *       *   * *    
       *                    * *   *     
 *    * *   *                *       *  
* *    *   * *   *       *          * * 
 *          *   * *     * *          *  
                 *       *              
----------------------------------------
   *       *        *        *        * 
  * *     * *      * *      * *   *  * *
   *       *        *        *   * *  * 
                       *          *     
       *              * *               
      * *      *       *          *     
       *      * *                * *    
  *        *   *    *        *    *   * 
 * *      * *      * *      * *      * *
  *        *        *        *        * 
----------------------------------------
                                    *   
     *     *                       * *  
    * *   * *                       *   
     *     *                            
                   *         *          
                  * *       * *         
  *                *    *    *        * 
 * *    *              * *           * *
  *    * *              *             * 
        *                               
----------------------------------------
                       *                
                      * *               
                     *   *              
                      * *               
     *                 *                
    * *                                 
     *                                  
                                        
                                        
                                        
----------------------------------------
                        *               
    *                  * *              
   * *                  *               
    *                                   
                             *          
                  *         * *         
                 * *         *          
       *          *                   * 
      * *                            * *
       *                              * 
----------------------------------------
                                    *   
                   *               * *  
                  * *               *   
                   *                    
                             *          
                            * *         
  *                          *          
 * *        *                           
  *        * *                          
            *                           
----------------------------------------
                                        
                         *              
                        * *             
                         *              
    *                                   
   * *                                  
    *                                   
                                 *      
                                * *     
                                 *      
----------------------------------------
                                    *   
                                   * *  
                                    *   
                   *                    
                  * *                   
                   *                    
  *                          *          
 * *        *               * *         
  *        * *               *          
            *                           
----------------------------------------
            *                           
     *     * *                       *  
    * *     *                       * * 
     *            *                  *  
                 * *                    
        *         *          *          
  *    * *                  * *         
 * *  *   *        *         *          
  *    * *        * *                   
        *          *                    
----------------------------------------
                                    *   
     *      *                      * *  
    * *    * *                      *   
     *      *                           
                             *          
                   *        * *         
  *               * *   *    *        * 
 * *    *          *   * *           * *
  *    * *              *             * 
        *                               
----------------------------------------
                                        
     *                                  
    * *                                 
     *             *                    
                  * *        *          
                   *        * *         
  *                          *          
 * *   *           *               *    
  *   * *         * *             * *   
       *           *               *    
----------------------------------------
                                    *   
     *      *                      * *  
    * *    * *                      *   
     *      *                           
                   *    *    *          
                  * *  * *  * *         
  *                *    *    *        * 
 * *    *                            * *
  *    * *                            * 
        *                               
----------------------------------------
                                        
                                        
                                        
                                        
    *                    *       *      
   * *                  * *     * *     
    *                    *       *      
                                        
                                        
                                        
----------------------------------------
                                        
                                *       
                               * *      
                                *       
     *                                  
    * *                                 
     *                                  
                                        
                                        
                                        
----------------------------------------
                                        
                                        
                         *              
                        * *             
    *                  *   *            
   * *                  * *             
    *                    *              
                                 *      
                                * *     
                                 *      
----------------------------------------
            *                           
     *     * *                       *  
    * *     *                       * * 
     *            *                  *  
                 * *                    
                  *          *          
  *          *              * *         
 * *   *    * *              *          
  *   * *    *                          
       *                                
----------------------------------------
                                        
    *                                   
   * *               *                  
    *               * *                 
                  *  *                  
                 * *                    
                  *                     
       *                                
      * *                               
       *                                
----------------------------------------
                        *               
    *                  * *              
   * *                  *               
    *                                   
               *             *          
              * *           * *         
               *             *          
       *                              * 
      * *                            * *
       *                              * 
----------------------------------------
                                        
                                        
                        *               
                       * *              
     *                  *               
    * *                                 
     *                                  
                                        
                                        
                                        
----------------------------------------

Sample output:

3
14
15
9
2
6
5
3
5
8
9
7
9
3
2
3
8
4
6
2

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1hide24450.12552009/10/10 00:23:390B / 22B / 19B
2leonid470.08502009/10/09 19:09:360B / 22B / 22B
3flagitious480.08842009/10/10 05:13:070B / 19B / 27B
4yvl480.07222009/10/13 16:04:330B / 23B / 22B

Perl _

RankUserSizeTimeDateStatistics
1flog410.02772009/10/20 08:37:530B / ?B / ?B
2yibe420.04632009/10/21 05:14:530B / 13B / 25B
3tybalt89430.04552009/10/20 07:49:180B / ?B / ?B
4dcutter430.03212009/10/20 23:19:520B / 16B / 24B

Python _

RankUserSizeTimeDateStatistics
1Mark Byers600.12122009/10/11 03:02:150B / 34B / 26B
2recursive780.13212009/10/10 00:17:580B / 45B / 30B
3hallvabo780.17282009/10/10 07:15:300B / 41B / 33B
4leonid790.17512009/10/09 19:26:300B / 44B / 33B

PHP _

RankUserSizeTimeDateStatistics
1o-cn790.02272009/11/27 03:37:400B / 38B / 39B

Scheme _

RankUserSizeTimeDateStatistics
1amanatto1700.46852009/10/12 17:24:110B / ?B / ?B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima1330.41402009/10/20 10:48:250B / 85B / 40B
2kozima1320.39062009/10/23 08:49:000B / 84B / 40B

Arc _

RankUserSizeTimeDateStatistics
1pooq11910.34822009/10/19 14:35:520B / 88B / 29B
2murky-satyr11713.47242009/10/26 21:22:440B / 50B / 50B

Io _

RankUserSizeTimeDateStatistics
1pooq1400.23252012/11/20 22:42:160B / 99B / 32B

JavaScript _

RankUserSizeTimeDateStatistics
1nn891.03092009/10/09 12:53:240B / 43B / 45B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*882.25222009/10/16 19:35:400B / 48B / 37B
2*yuko*871.10952011/11/22 05:14:530B / 48B / 35B

J _

RankUserSizeTimeDateStatistics
1pooq720.64542009/10/19 01:16:260B / 27B / 39B
2pooq440.17832009/10/31 18:29:320B / 16B / 24B

C _

RankUserSizeTimeDateStatistics
1nu910.03602009/10/11 07:50:320B / 46B / 44B
251b920.05362009/10/11 21:03:030B / 47B / 45B
3chocobi1030.06512009/10/10 20:10:300B / 50B / 53B

D _

RankUserSizeTimeDateStatistics
151b1270.03942009/10/11 20:53:100B / 82B / 42B

OCaml _

RankUserSizeTimeDateStatistics
1ksk1230.31272009/10/13 22:21:470B / 66B / 50B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa920.16112009/10/17 14:49:540B / ?B / ?B
2rst76960.10072009/10/18 03:19:030B / 61B / 30B
3Lost_dog980.07172009/10/17 18:39:230B / 43B / 52B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1150.06502012/11/19 20:53:470B / 60B / 51B

AWK _

RankUserSizeTimeDateStatistics
1nn570.10972009/10/09 12:57:000B / 20B / 37B

jq _

RankUserSizeTimeDateStatistics
1eban770.04392014/12/08 16:51:040B / 26B / 48B

Postscript _

RankUserSizeTimeDateStatistics
1Mark Byers771.35832009/10/10 17:38:1228B / 25B / 23B
2yshl(bin)781.26182009/10/10 16:30:0940B / 22B / 15B
3yshl1351.27742009/10/10 16:29:560B / 97B / 17B

GolfScript _

RankUserSizeTimeDateStatistics
1Mark Byers231.26872009/10/11 03:24:310B / 6B / 17B

FlogScript _

RankUserSizeTimeDateStatistics
1milieu350.23072010/08/15 16:40:450B / ?B / ?B

Vim _

RankUserSizeTimeDateStatistics
1nn781.03992009/10/17 00:48:272B / 40B / 32B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr410.33722009/12/22 15:14:010B / 13B / 24B

Groovy _

RankUserSizeTimeDateStatistics
1nn11311.39612009/10/09 23:44:270B / 55B / 55B
2murky-satyr753.59322009/11/28 05:09:350B / 32B / 42B

Language Ranking_

RankLangUserSizeScore
1GolfScriptMark Byers2310000
2FlogScriptmilieu356571
3Perlflog415609
4gorubymurky-satyr415609
5Jpooq445227
6Rubyhide24455111
7AWKnn574035
8PythonMark Byers603833
9Groovymurky-satyr753066
10PostscriptMark Byers772987
11jqeban772987
12Vimnn782948
13PHPo-cn792911
14BASIC*yuko*872643
15JavaScriptnn892584
16Cnu912527
17Haskellnotogawa922500
18Fortran*yuko*1152000
19Arcmurky-satyr1171965
20OCamlksk1231869
21D51b1271811
22Common LISPkozima1321742
23Iopooq1401642
24Schemeamanatto1701352

return top