結果
| 問題 |
No.504 ゲーム大会(ランキング)
|
| コンテスト | |
| ユーザー |
akakimidori
|
| 提出日時 | 2017-06-25 13:24:07 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 277 bytes |
| コンパイル時間 | 178 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-04 08:32:11 |
| 合計ジャッジ時間 | 1,540 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
コンパイルメッセージ
main.c: In function ‘run’:
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d",&a);
| ^~~~~~~~~~~~~~
main.c:13:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
13 | scanf("%d",&b);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
void run(void){
int n;
scanf("%d",&n);
int a;
scanf("%d",&a);
printf("1\n");
int cnt=0;
int i;
for(i=1;i<n;i++){
int b;
scanf("%d",&b);
cnt+=(b>a);
printf("%d\n",cnt+1);
}
return;
}
int main(void){
run();
return 0;
}
akakimidori