結果
問題 | No.175 simpleDNA |
ユーザー |
![]() |
提出日時 | 2020-09-07 10:17:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 763 bytes |
コンパイル時間 | 1,406 ms |
コンパイル使用メモリ | 99,956 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 10:19:39 |
合計ジャッジ時間 | 1,664 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
#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;}