結果
問題 | No.504 ゲーム大会(ランキング) |
ユーザー |
|
提出日時 | 2017-12-01 04:18:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 1,563 ms |
コンパイル使用メモリ | 167,736 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 19:36:32 |
合計ジャッジ時間 | 3,763 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 2 WA * 11 |
ソースコード
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define SZ(n) (int)(n).size() #define ALL(n) (n).begin(), (n).end() #define MOD % 1000000007 using namespace std; typedef long long LL; typedef vector<int> VI; int main() { int n; cin >> n; VI ai(n); REP(i, n) { int a; cin >> a; ai[i] = a; } int ans = 1; REP(i, n) { if (ai[i] > ans) ans++; cout << ans << endl; } return 0; }