提出 #28872703
ソースコード 拡げる
#include<stdio.h>
int main()
{
int N,L,W,j,i,a[N],t[L],cnt;
scanf("%d %d %d",&N,&L,&W);
for(i=0;i<N;i++){
scanf("%d",&a[i]);
}
for(i=0;i<W;i++){
cnt=a[i];
for(j=0;j<W;j++)
t[cnt+j]=1;
}
cnt=0;
for(i=0;i<L;i++){
if(t[i]==0){
for(j=0;j<W;j++){
t[i+j]=1;
}
cnt++;
}
}
printf("%d",cnt);
return 0;
}
提出情報
提出日時
2022-01-29 22:25:02+0900
問題
A - Bridge and Sheets
ユーザ
TCSP
言語
C (GCC 9.2.1)
得点
0
コード長
352 Byte
結果
RE
実行時間
2205 ms
メモリ
1728 KiB
コンパイルエラー
./Main.c: In function ‘main’:
./Main.c:6:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d %d %d",&N,&L,&W);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
./Main.c:8:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%d",&a[i]);
| ^~~~~~~~~~~~~~~~~
ジャッジ結果
セット名
Sample
All
得点 / 配点
0 / 0
0 / 300
結果
セット名
テストケース
Sample
sample_01.txt, sample_02.txt, sample_03.txt
All
hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名
結果
実行時間
メモリ
hand_01.txt
RE
104 ms
1460 KiB
hand_02.txt
RE
100 ms
1464 KiB
hand_03.txt
AC
1 ms
1728 KiB
hand_04.txt
RE
105 ms
1528 KiB
hand_05.txt
RE
101 ms
1484 KiB
random_01.txt
RE
102 ms
1532 KiB
random_02.txt
RE
101 ms
1484 KiB
random_03.txt
RE
102 ms
1484 KiB
random_04.txt
RE
103 ms
1488 KiB
random_05.txt
RE
107 ms
1376 KiB
sample_01.txt
RE
104 ms
1492 KiB
sample_02.txt
AC
2 ms
1636 KiB
sample_03.txt
TLE
2205 ms
1372 KiB