Submission #00078


ソースコード

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
#include<stdio.h>
int main(){
int h,w,i,j,n;
char t[101][101];
int c[101][101];
int p=-1;
scanf("%d %d",&h,&w);
for(i=0;i<h;i++){
scanf("%s",t[i]);
}
for(i=0;i<h;i++){//縦
for(j=0;j<w;j++){//横
if(t[i][j]=='c'){ //自分の場所に雲がある
c[i][j]=0;
p=j; //雲の位置をメモ
}
else{//雲がない
if(p==-1) c[i][j]=-1;//雲がこない
else c[i][j]=j-p;
}
printf("%d ",c[i][j]);
}
p=-1;
printf("\n");
}
return 0;
}

ステータス

項目 データ
問題 0006 - 気象予報士 (Weather Forecaster)
ユーザー名 ei1436
投稿日時 2015-11-12 17:57:06
言語 C
状態 Wrong Answer
得点 0
ソースコード長 551 Byte
最大実行時間 12 ms
最大メモリ使用量 416 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
2015-yo-t3-in1.txt WA 12 ms 380 KB
1
2015-yo-t3-in2.txt WA 12 ms 312 KB
2
2015-yo-t3-in3.txt WA 11 ms 324 KB
3
2015-yo-t3-in4.txt WA 12 ms 372 KB
4
2015-yo-t3-in5.txt WA 10 ms 416 KB
5