結果
| 問題 |
No.2092 Conjugation
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2022-10-07 22:17:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 20 ms / 2,000 ms |
| コード長 | 512 bytes |
| コンパイル時間 | 2,085 ms |
| コンパイル使用メモリ | 195,028 KB |
| 最終ジャッジ日時 | 2025-02-07 23:31:57 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int n;
cin>>n;
vector<int> A(n);
rep(i,n) cin>>A[i];
int now=n-1;
vector<int> ANS(A[0]+1);
for(int i=1;i<=A[0];i++){
while(A[now]<i) now--;
ANS[i]=now;
}
for(int i=1;i<=A[0];i++){
if(i>1) cout<<" ";
cout<<ANS[i]+1;
}
cout<<endl;
return 0;
}
umezo