結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2016-05-03 07:37:59 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 245 bytes |
コンパイル時間 | 366 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 02:14:44 |
合計ジャッジ時間 | 1,463 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
コンパイルメッセージ
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 = 0; scanf("%d", &n); for( i = 0; i < n; i++) { scanf("%d", &s[i]); if ( s[i] > a ) a = s[i]; if ( s[i] < a && s[i] > b ) b = s[i]; } printf("%d\n", b); return 0; }