結果
| 問題 |
No.2092 Conjugation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-02 19:36:28 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 2,432 bytes |
| コンパイル時間 | 4,893 ms |
| コンパイル使用メモリ | 313,444 KB |
| 実行使用メモリ | 13,768 KB |
| 最終ジャッジ日時 | 2025-01-02 19:36:47 |
| 合計ジャッジ時間 | 17,334 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 TLE * 1 |
ソースコード
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ar array
#define vt vector
#define pq priority_queue
#define pu push
#define pub push_back
#define em emplace
#define emb emplace_back
#define mt make_tuple
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define allp(x, l, r) x.begin() + l, x.begin() + r
#define len(x) (int)x.size()
#define uniq(x) unique(all(x)), x.end()
using ll = long long;
using ld = long double;
using ull = unsigned long long;
template <class T, size_t N>
void re(array <T, N>& x);
template <class T>
void re(vt <T>& x);
template <class T>
void re(T& x) {
cin >> x;
}
template <class T, class... M>
void re(T& x, M&... args) {
re(x), re(args...);
}
template <class T>
void re(vt <T>& x) {
for(auto& it : x) re(it);
}
template <class T, size_t N>
void re(array <T, N>& x) {
for(auto& it : x) re(it);
}
template <class T, size_t N>
void wr(const array <T, N>& x);
template <class T>
void wr(const vt <T>& x);
template <class T>
void wr(const T& x) {
cout << x;
}
template <class T, class ...M>
void wr(const T& x, const M&... args) {
wr(x), wr(args...);
}
template <class T>
void wr(const vt <T>& x) {
for(auto it : x) wr(it, ' ');
}
template <class T, size_t N>
void wr(const array <T, N>& x) {
for(auto it : x) wr(it, ' ');
}
template<class T, class... M>
auto mvt(size_t n, M&&... args) {
if constexpr(sizeof...(args) == 1)
return vector<T>(n, args...);
else
return vector(n, mvt<T>(args...));
}
void set_fixed(int p = 0) {
cout << fixed << setprecision(p);
}
void set_scientific() {
cout << scientific;
}
void Open(const string& name) {
#ifndef ONLINE_JUDGE
(void)!freopen((name + ".in").c_str(), "r", stdin);
(void)!freopen((name + ".out").c_str(), "w", stdout);
#endif
}
vt <int> hookLength(vt <int> hook) {
vt <int> hook_t(hook[0]);
for (int i = 0; i < hook[0]; ++i) {
int x = 0;
while (x < len(hook) && hook[x] >= i + 1) ++x;
hook_t[i] = x;
}
return hook_t;
}
void solve() {
int n; re(n);
vt <int> hook(n); re(hook);
wr(hookLength(hook));
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
//Open("");
int t = 1;
for(;t;t--) {
solve();
}
return 0;
}