Submission #816015

#TimeUsernameProblemLanguageResultExecution timeMemory
816015devariaotaEkoeko (COCI21_ekoeko)C++17
10 / 110
1 ms852 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ull unsigned long long #define pii pair<int, int> #define pll pair<ll, ll> #define fi first #define se second const int N = 2e5 + 5; int cnt[50]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; string s; cin >> n >> s; for (int i = 0; i < 2 * n; i++) cnt[s[i] - 'a']++; if (cnt[0] == n and cnt[1] == n) cout << 1ll * n * n / 4 << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...