提出 #480584


ソースコード 拡げる


//----------------------------------------------------------------------------------------------------------------------
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <string>
#include <iomanip>
#include <fstream>
#include <cctype>
#include <utility>
#include <vector>
#include <unordered_map>
#include <map>
#include <set>
#include <cctype>
#include <queue>
#include <stack>

using namespace std;

//-------------------------------------------  Local Read and Write Setting---------------------------------------------

#ifdef LOCAL
ifstream fin("/Users/yilin1/Documents/CLion/Test/input");
#define cin fin

//ofstream fout("/Users/yilin1/Documents/CLion/Test/input");
//#define cout fout

#endif

//----------------------------------------- Default Definitions Part   -------------------------------------------------

#define ll long long int
#define SP " "
#define CO1(a) cout << (a) << endl;
#define CO2(a, b) cout << (a) << SP << (b) << endl;
#define CO3(a, b, c) cout << (a) << SP << (b) << SP << (c) << endl;
#define FOR(ii, m, n) for(int ii = m; ii < n; ++ii)
#define REP(ii, n) FOR(ii, 0, n)
#define FORD(ii, m, n) for(int ii = m; ii >= n; --ii)
#define REPD(ii, m) FORD(ii, m, 0)
#define PB push_back
#define MP(a, b) make_pair((a), (b))

#define IFNUL(a) if((a) == NULL)
#define IFNNUL(a) if((a) != NULL)


//----------------------------------------------------------------------------------------------------------------------





//-----------------------------------------  Main function  ------------------------------------------------------------
int main() {
    //TODO insert content



    string x;
    while( getline(cin, x)){
        int A[] = {0, 0, 0, 0, 0, 0};
        REP(ii, x.size()){
            A[x[ii] - 'A']++;
        }
        cout << A[0] << SP << A[1] << SP << A[2] << SP << A[3] << SP << A[4] << SP << A[5] << endl;
    }



    return EXIT_SUCCESS;
}
//----------------------------------------------------------------------------------------------------------------------

提出情報

提出日時
問題 B - 文字数カウント
ユーザ cilam
言語 C++11 (GCC 4.9.2)
得点 100
コード長 2170 Byte
結果 AC
実行時間 25 ms
メモリ 928 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 19
セット名 テストケース
Sample example_0.txt, example_1.txt, example_2.txt
All allone_0.txt, allone_1.txt, example_0.txt, example_1.txt, example_2.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, maxrand_0.txt, maxrand_1.txt, maxrand_2.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, example_0.txt, example_1.txt, example_2.txt
ケース名 結果 実行時間 メモリ
allone_0.txt AC 23 ms 928 KiB
allone_1.txt AC 25 ms 800 KiB
example_0.txt AC 22 ms 924 KiB
example_1.txt AC 22 ms 920 KiB
example_2.txt AC 23 ms 924 KiB
handmade_0.txt AC 23 ms 924 KiB
handmade_1.txt AC 22 ms 928 KiB
handmade_2.txt AC 23 ms 716 KiB
maxrand_0.txt AC 24 ms 800 KiB
maxrand_1.txt AC 23 ms 800 KiB
maxrand_2.txt AC 23 ms 804 KiB
random_0.txt AC 25 ms 924 KiB
random_1.txt AC 23 ms 924 KiB
random_2.txt AC 25 ms 736 KiB
random_3.txt AC 25 ms 796 KiB
random_4.txt AC 25 ms 928 KiB