結果

問題 No.175 simpleDNA
ユーザー f843nmfwisfeuwf843nmfwisfeuw
提出日時 2020-09-07 10:17:42
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 763 bytes
コンパイル時間 1,079 ms
コンパイル使用メモリ 97,860 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-19 16:29:30
合計ジャッジ時間 1,895 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
#include <bitset>
#include <cassert>

using namespace std;

long pow(long x, long n) {
    long ans = 1;
    while (n > 0) {
        if ((n & 1) == 1) {
            ans = ans * x;
        }
        x = x * x;
        n = n >> 1;
    }
    return ans;
}

int main() {

    int L, N;
    cin >> L >> N;
    set<string> st;
    for (int i = 0; i < N; ++i) {
        string S;
        cin >> S;
        st.insert(S);
    }
    long long res = 0;
    for (string s : st) {
        res += pow(2, L - 3);
    }

    cout << res << endl;
    return 0;
}
0