結果
| 問題 | No.2707 Bag of Words Encryption | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-04-09 14:55:06 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 22 ms / 2,000 ms | 
| コード長 | 549 bytes | 
| コンパイル時間 | 2,247 ms | 
| コンパイル使用メモリ | 201,380 KB | 
| 最終ジャッジ日時 | 2025-02-20 23:22:05 | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 15 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
#define debug 0
#define YES cout << "Yes" << endl;
#define NO cout << "No" << endl;
using ll = long long;
using ld = long double;
const int mod = 998244353;
const int MOD = 1000000007;
const double pi = atan2(0, -1);
#include <time.h>
#include <chrono>
int main() {
	int N;
	string S;
	cin >> N >> S;
	map<char, int> mp;
	rep(i, N) {
		mp[S[i]]++;
	}
	string ans = "";
	for (char c = 'A'; c <= 'Z'; c++) {
		ans += to_string(mp[c]);
	}
	cout << ans << endl;
}
            
            
            
        