Submission #54134


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<bits/stdc++.h>
using namespace std;
#define INF 1000000007
int i[1111][111],u[1111];
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a=0,b=0,c=0,d=0,e=0;
string s[111];
cin >>a>>b;
for(int n=0;n<a;n++) cin >>s[n];
for(int n=0;n<a;n++){
for(int m=0;m<b;m++){
if(s[n][m]!='c') i[n][m]=-1;
}
}
for(int n=0;n<a;n++){
for(int m=0;m<b;m++){
if(i[n][m]==0){
e=1;
for(int o=m+1;o<b;o++){
if(i[n][o]==0) e=0;
i[n][o]=e,e++;
}
break;
}
}
}
for(int n=0;n<a;n++){
cout <<i[n][0];
for(int m=1;m<b;m++)
cout <<' '<<i[n][m];
cout <<'\n';
}
return (0);
}

ステータス

項目 データ
問題 0205 - 気象予報士 (Weather Forecaster)
ユーザー名 ei1923
投稿日時 2019-09-04 16:29:24
言語 C++14
状態 Accepted
得点 5
ソースコード長 681 Byte
最大実行時間 28 ms
最大メモリ使用量 640 KB

セット

セット 得点 Cases
1 IN1 1 / 1 *2015-yo-t3-in1.txt
2 IN2 1 / 1 *2015-yo-t3-in2.txt
3 IN3 1 / 1 *2015-yo-t3-in3.txt
4 IN4 1 / 1 *2015-yo-t3-in4.txt
5 IN5 1 / 1 *2015-yo-t3-in5.txt

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
2015-yo-t3-in1.txt AC 28 ms 476 KB
1
2015-yo-t3-in2.txt AC 21 ms 556 KB
2
2015-yo-t3-in3.txt AC 19 ms 608 KB
3
2015-yo-t3-in4.txt AC 23 ms 496 KB
4
2015-yo-t3-in5.txt AC 25 ms 640 KB
5