Weather Forecaster (AOJ 0610) by ynu_b
Contest: 3408    RunID: 2260498    Status: Wrong Answer    Date: Sun Apr 16 15:51:16 JST 2017


/// write by natto-
//#include<stdio.h>

#include<iostream>

using namespace std;

int main(){
    //scanf("%d",&n);
    int h,w;
    cin>>h>>w;
    char cloud[h][w];
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>cloud[i][j];
        }
    }
    for(int i = 0; i < h; i++){
        int j=0;
        cout<<"hoge"<<endl;
            while(cloud[i][j] != 'c'&&j<w){
                cout << -1<<' ';
                j++;
            }
            while(j<w){
                int count = 0;
                if(cloud[i][j] == 'c'){
                    //int count = 0;
                    count=0;
                    cout<<count;
                }
                else{
                    count++;
                    cout<<count;
                }
                j++;
                if(j<w){
                    cout<<' ';
                }
            }
            cout << endl;
    }
    //input finish
    return 0;
}