結果
| 問題 | No.2092 Conjugation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-21 13:48:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 868 bytes |
| 記録 | |
| コンパイル時間 | 1,626 ms |
| コンパイル使用メモリ | 174,692 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 23:52:40 |
| 合計ジャッジ時間 | 4,642 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 2 WA * 16 |
ソースコード
#include <bits/stdc++.h>
#if 1 && defined(LOCAL)
#include <debug.hpp>
#else
#define debug(...)
#define line
#endif
using namespace std;
using ll = long long;
using ld = long double;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); }
template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); }
int main(){
int N;
cin>>N;
vector<int>A(100000,0);
int max=0;
for(int i=0;i<N;i++){
int a;
cin>>a;
if(chmax(max,a))A.resize(a,0);
a--;
A[a]++;
}
int now=0;
stack<int>sta;
for(int i=A.size()-1;i>=0;i--){
now+=A[i];
sta.push(now);
}
while(!sta.empty()){
cout<<sta.top()<<endl;
sta.pop();
}
}