結果
| 問題 |
No.504 ゲーム大会(ランキング)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-12 15:00:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 2,000 ms |
| コード長 | 356 bytes |
| コンパイル時間 | 1,511 ms |
| コンパイル使用メモリ | 57,600 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-12 15:00:55 |
| 合計ジャッジ時間 | 2,451 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
main.cpp:12:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | scanf("%d",&a0);
| ~~~~~^~~~~~~~~~
main.cpp:16:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | scanf("%d",&a);
| ~~~~~^~~~~~~~~
ソースコード
#include<iostream>
#define rep(i,n) for(i=0;i<(int)(n);i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int n,a,a0;
int main(){
int i;
scanf("%d",&n);
scanf("%d",&a0);
i=0;
printf("%d\n",i+1);
while(--n){
scanf("%d",&a);
if(a>a0)i++;
printf("%d\n",i+1);
}
return 0;
}