結果
問題 | No.2707 Bag of Words Encryption |
ユーザー |
|
提出日時 | 2024-11-01 20:08:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 641 bytes |
コンパイル時間 | 3,950 ms |
コンパイル使用メモリ | 278,800 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-01 20:08:47 |
合計ジャッジ時間 | 4,603 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef vector<P> VP; typedef vector<ll> VI; typedef vector<VI> VVI; #define REP(i, n) for (ll i = 0; i < (n); i++) #define ALL(v) v.begin(), v.end() #define OUT(n) cout << n << "\n" // constexpr ll MOD=998244353; // constexpr ll MOD=1000000007; // constexpr ll INF=2e18; int main() { ios::sync_with_stdio(false); cin.tie(0); ll N; string S; cin >> N >> S; VI cnt(26); REP(i, N) { cnt[S[i] - 'A']++; } string ans = ""; REP(i, 26) { ans += to_string(cnt[i]); } OUT(ans); }