結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
kapo
|
| 提出日時 | 2016-05-03 07:21:12 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 212 bytes |
| 記録 | |
| コンパイル時間 | 334 ms |
| コンパイル使用メモリ | 29,128 KB |
| 最終ジャッジ日時 | 2026-02-23 21:13:39 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 25 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d", &s[i]);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
int i, n, s[100000], a=0, b;
scanf("%d", &n);
for( i = 0; i < n; i++) {
scanf("%d", &s[i]);
b = s[i] - (i+1);
if( b > a ) a = b;
}
printf("%d\n", a);
return 0;
}
kapo