ソースコード 拡げる

Copy
```#include <stdio.h>
#include <stdint.h>
#define N (2000)
//#define D (2000)
int main(){
int i, j, k;
int n;
int try[N];
int Ai, prev=0;
//  int64_t ans = 1;
long long int ans = 1;

scanf("%d", &n);

for(i=0; i<n; i++) {
int w, t=0;
scanf("%d", &Ai);
//printf("%d ", Ai);
if(Ai == -1) {
int count=-1;
do {
count++;
i++;
scanf("%d", &Ai);
//printf("%d ", Ai);
} while(Ai == -1);

w = Ai - prev + 1;
//printf("Ai:%d prev:%d w:%d ", Ai, prev, w);

for(k=0; k<w; k++)
try[k] = 1;
for(j=0; j<count; j++)
for(k=1; k<w; k++) {
try[k] += try[k-1];
}
for(k=0; k<w; k++)
t += try[k];
t %= 100000007;
ans = (ans * t) % 100000007;
//printf("t:%d ans:%d\n", t, ans);
}
prev = Ai;
}
printf("%lld\n", ans);
return 0;
}```

#### 提出情報

提出日時 2014-05-17 22:22:06+0900 C - タコヤ木 kuzumin C (GCC 4.6.4) 0 943 Byte WA 254 ms 836 KB

#### コンパイルエラー

```./Main.c: In function ‘main’:
./Main.c:13:8: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
./Main.c:17:10: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
./Main.c:24:14: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
```

#### ジャッジ結果

 AC × 2 RE × 1
 AC × 8 WA × 6
 AC × 14 WA × 12
 AC × 15 WA × 12 RE × 9
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
sample_01.txt AC 21 ms 736 KB
sample_02.txt AC 22 ms 792 KB
sample_03.txt RE 242 ms 772 KB
subtask1_01.txt AC 24 ms 644 KB
subtask1_02.txt AC 23 ms 712 KB
subtask1_03.txt AC 21 ms 784 KB
subtask1_04.txt AC 22 ms 788 KB
subtask1_05.txt WA 22 ms 796 KB
subtask1_06.txt WA 22 ms 796 KB
subtask1_07.txt WA 22 ms 788 KB
subtask1_08.txt AC 24 ms 776 KB
subtask1_09.txt AC 22 ms 788 KB
subtask1_10.txt WA 22 ms 800 KB
subtask1_11.txt WA 22 ms 792 KB
subtask1_12.txt WA 22 ms 792 KB
subtask2_01.txt AC 22 ms 732 KB
subtask2_02.txt AC 20 ms 792 KB
subtask2_03.txt AC 21 ms 724 KB
subtask2_04.txt WA 19 ms 788 KB
subtask2_05.txt AC 19 ms 792 KB
subtask2_06.txt WA 23 ms 768 KB
subtask2_07.txt WA 34 ms 836 KB
subtask2_08.txt AC 24 ms 784 KB
subtask2_09.txt AC 22 ms 792 KB
subtask2_10.txt WA 20 ms 784 KB
subtask2_11.txt WA 24 ms 716 KB
subtask2_12.txt WA 20 ms 788 KB
subtask3_01.txt AC 23 ms 796 KB
subtask3_02.txt RE 238 ms 800 KB
subtask3_03.txt RE 250 ms 760 KB
subtask3_04.txt RE 243 ms 792 KB
subtask3_05.txt RE 254 ms 792 KB
subtask3_06.txt RE 241 ms 792 KB
subtask3_07.txt RE 252 ms 804 KB
subtask3_08.txt AC 21 ms 788 KB
subtask3_09.txt AC 20 ms 788 KB
subtask3_10.txt RE 250 ms 684 KB
subtask3_11.txt RE 243 ms 792 KB
subtask3_12.txt RE 249 ms 704 KB