結果
| 問題 |
No.2092 Conjugation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-22 10:04:56 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| コード長 | 433 bytes |
| コンパイル時間 | 4,806 ms |
| コンパイル使用メモリ | 162,528 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 10:05:04 |
| 合計ジャッジ時間 | 7,098 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n; cin >> n;
vector<int> A(n);
for(auto& v : A) cin >> v;
int mx = *max_element(A.begin(), A.end());
int j = n - 1;
for(int i = 1; i <= mx; ++i) {
while(j >= 0 && A[j] < i) --j;
cout << j + 1 << " ";
}
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t = 1;
//cin >> t;
while(t--) solve();
}