提出 #6237657


ソースコード 拡げる

// {{{
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
// }}}

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

static constexpr int mod = (int)1e9 + 7;
static constexpr int inf = 100100100;
static constexpr ll linf = 1e18;
static constexpr double eps = 1e-9;
static constexpr double pi = 3.14159265359;

#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rrep(i, n) for (ll i = n; i >= 0; --i)
#define all(c) begin(c), end(c)
#define rall(c) rbegin(c), rend(c)
#define pb push_back
#define ist insert
#define fst first
#define snd second



int main() {
    // cin.tie(0);
    // ios_base::sync_with_stdio(false);
    ll N;
    cin >> N;
    vector<ll> H;
    rep (i, N) {
        ll h;
        cin >> h;
        H.pb(h);
    }
    ll ans = 0;
    rep (i, N) {
        bool f = true;
        for (ll j = 0; j <= i; ++j) {
            f = f && (H[i] >= H[j]);
        }
        if (f) ++ans;
    }
    cout << ans << endl;
}

提出情報

提出日時
問題 B - Great Ocean View
ユーザ gochiusa
言語 C++14 (Clang 3.8.0)
得点 200
コード長 1356 Byte
結果 AC
実行時間 1 ms
メモリ 256 KiB

ジャッジ結果

セット名 All Sample
得点 / 配点 200 / 200 0 / 0
結果
AC × 12
AC × 3
セット名 テストケース
All sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09
Sample sample_01, sample_02, sample_03
ケース名 結果 実行時間 メモリ
sample_01 AC 1 ms 256 KiB
sample_02 AC 1 ms 256 KiB
sample_03 AC 1 ms 256 KiB
testcase_01 AC 1 ms 256 KiB
testcase_02 AC 1 ms 256 KiB
testcase_03 AC 1 ms 256 KiB
testcase_04 AC 1 ms 256 KiB
testcase_05 AC 1 ms 256 KiB
testcase_06 AC 1 ms 256 KiB
testcase_07 AC 1 ms 256 KiB
testcase_08 AC 1 ms 256 KiB
testcase_09 AC 1 ms 256 KiB