結果

問題 No.2707 Bag of Words Encryption
ユーザー akia_Sakia_S
提出日時 2024-03-31 13:46:05
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 4,122 bytes
コンパイル時間 2,107 ms
コンパイル使用メモリ 203,708 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-31 13:46:09
合計ジャッジ時間 2,769 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 3 ms
6,676 KB
testcase_08 AC 3 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 AC 3 ms
6,676 KB
testcase_13 AC 2 ms
6,676 KB
testcase_14 AC 2 ms
6,676 KB
testcase_15 AC 2 ms
6,676 KB
testcase_16 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
//#include <atcoder/dsu>
using namespace std;


void _main();int main(){cin.tie(nullptr);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);_main();return 0;}




using ll = long long;
using ld = long double;
using ull = unsigned long long;


//変数宣言


#define rep(i, a, b) for (ll i = (a); i < (ll)(b); i++)


#define ALL(x) (x).begin(), (x).end()
#define rALL(x) (x).rbegin(), (x).rend()
//#define mem(a, x) memset((a), (x), sizeof(a))
//#define sz(a) (int)((a).size())
#define el '\n'
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define vl vector<ll>
#define vvl vector<vector<ll>>


#define yesno(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
//YesかNoか。↑多分汎用性低い
#define Yes cout << "Yes" << el
#define No cout << "No" << el
#define YES cout << "YES" << el
#define NO cout << "NO" << el


//可変長引数で入力を受け取りつつ変数を宣言
inline void scan(){}
template<class Head,class... Tail>
inline void scan(Head&head,Tail&... tail){std::cin>>head;scan(tail...);}
#define LL(...) ll __VA_ARGS__;scan(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;scan(__VA_ARGS__)
//vectorのcin
template<typename T>
std::istream &operator>>(std::istream&is,std::vector<T>&v){for(T &in:v){is>>in;}return is;}
//vectorのcout
template<typename T>
std::ostream &operator<<(std::ostream&os,const std::vector<T>&v){for(auto it=std::begin(v);it!=std::end(v);){os<<*it<<((++it)!=std::end(v)?" ":"");}return os;}
//x,y,x,yを渡すとldで距離を返す
long double my_distance(long double xi,long double yi,long double xj,long double yj){return sqrt(abs((xi-xj)*(xi-xj))+abs((yi-yj)*(yi-yj)));}
//可変長引数のprint関数
void print(){cout << '\n';}
template<class T, class... Ts>
void print(const T& a, const Ts&... b){cout << a;(cout << ... << (cout << ' ', b));cout << '\n';}
//可変長引数のmin
template<class... T>
constexpr auto min(T... a){return min(initializer_list<common_type_t<T...>>{a...});}
//可変長引数のmax
template<class... T>
constexpr auto max(T... a){return max(initializer_list<common_type_t<T...>>{a...});}


// aよりもbが大きいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>bool chmax(T &a, const T& b) { if (a < b) { a = b; return true;} return false;}
// aよりもbが小さいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>bool chmin(T &a, const T& b) { if (a > b) { a = b; return true;} return false;}
template<typename T> inline T sum(vector<T>&a){T ret{};for(auto&i:a)ret+=i;return ret;}
template<typename T> inline T min(vector<T>&a){T ret=a[0];for(auto&i:a)chmin(ret,i);return ret;}
template<typename T> inline T max(vector<T>&a){T ret=a[0];for(auto&i:a)chmax(ret,i);return ret;}
// n次元配列の初期化。第2引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){std::fill( (T*)array, (T*)(array+N), val );}
//mod切り替え
//const ll mod = 1000000009;
//const ll mod = 998244353;
//const ll mod = 1000000007
const ll mod=100000;
using pl=pair<ll,ll>;

//2次元累積話の生成(入力を受けた配列の長さはh、 w(半開区間、配るDP))
template <class T>
vector<vector<T>> imos_2d(const vector<vector<T>>& a) {int h = a.size(), w = a[0].size();vector<vector<T>> s(h+1,vector<T>(w+1,0));rep(i,0,h)rep(j,0,w)s[i + 1][j + 1] += s[i + 1][j] + s[i][j + 1] - s[i][j] + a[i][j];return s;}
//二次元累積和の部分和(半開) // クエリ [x1, x2) × [y1, y2) の長方形区域の和
template <class T>
ll accsum(const vector<vector<T>>& s, int sr,int gr, int sc,int gc) {return s[gr][gc]-s[sr][gc]-s[gr][sc]+s[sr][sc];}

const ll inf = 1LL<<60;

//右、下、左、上、右下、右上、左下、左上
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};


void _main()
{
    LL(n);
    STR(s);
    vl cnt(26,0);
    for(auto c:s){
        cnt[c-'A']++;
    }
    for(int i=0;i<26;i++){
        cout<<cnt[i];
    }
  
   
}
0