結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2016-05-03 07:21:12 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 212 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-05 03:25:59 |
合計ジャッジ時間 | 1,546 ms |
ジャッジサーバーID (参考情報) |
judge1 / 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; }