結果

問題 No.2092 Conjugation
ユーザー kakeyamay
提出日時 2022-10-26 17:28:52
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 1,133 ms
コンパイル使用メモリ 96,344 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-04 06:43:04
合計ジャッジ時間 3,014 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdint>
#include <iostream>
#include <ranges>
#include <vector>

int main() {
  std::uint32_t N;
  std::cin >> N;
  std::vector<std::uint32_t> As(N);
  for (auto& A : As) std::cin >> A;
  auto row = N - 1;
  for (std::size_t col = 0; col < As.front(); ++col) {
    while (0 < row && As[row] < col + 1) --row;
    std::cout << row + 1 << ' ';
  }
  std::cout << '\n';
}
0