A. Generous Kefa 题意:n个气球分给k个人,问每个人能否拿到的气球都不一样 解法:显然当某种气球的个数大于K的话,就GG了. #include <bits/stdc++.h> using namespace std; int cnt[110]; char s[110]; int main() { int n,k; scanf("%d%d",&n,&k); scanf("%s", s); int len = strlen(s…
Table of Contents A. Generous KefaB. GodsendC. Leha and Function A. Generous Kefa One day Kefa found n baloons. For convenience, we denote color of i-th baloon as s**i - lowercase letter of the Latin alphabet. Also Kefa has k friends. Friend will be…
A. Generous Kefa One day Kefa found n baloons. For convenience, we denote color of i-th baloon as si — lowercase letter of the Latin alphabet. Also Kefa has k friends. Friend will be upset, If he get two baloons of the same color. Kefa want to give…