916
  • 2024-02-03left 2 Codeforces Round 916 (Div. 3)
    题目链接A.遍历字符串,用map记录下每个字符出现的次数最后遍历26个字母,若出现了相应次数答案+1#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongconstintN=1e5+10;voidsolve(){intn;cin>>n;strings;cin>>s;map<char,int>mp;
  • 2024-01-26Codeforces Round 916 (Div
    AProblemsolvingLog题目描述给一个整数n,字符串s,字符串中s[i]表示第i分钟解决第s[i]题.问题A需要1分钟解决,问题B需要2分钟解决,以此类推.问:可以解决多少题?解题思路遍历字符串,统计问题A--Z用了多少时间解决.最后在遍历数组,判断问题A--Z是否满足解决时间.代
  • 2023-12-20Codeforces Round 916 (Div. 3)
    目录写在前面ABCDE1/E2FG1G2写在最后写在前面比赛地址:https://codeforces.com/contest/1914。第二天没早八打个div3休闲娱乐保持下手感,然而div3都AK不了了,纯纯废物一个,天天上大学导致的。唉,一学期碰上好几个byd恼弹老师,大学一秒也不想上了,折磨。马娘台服马上1.5周
  • 2023-12-20Codeforces Round 916 (Div. 3)
    A.ProblemsolvingLogmap枚举字母#include<bits/stdc++.h>usingnamespacestd;voidsolve(){ intn; strings; cin>>n>>s; intans=0; s=""+s; map<char,int>mp; for(inti=1;i<=n;i++){ mp[s[i]]++; } for(autoc:mp)
  • 2023-12-20Codeforce Round 916(div3)
    CodeforcesRound916(div3)[Problem-A-Codeforces]:ProblemsolvingLogA.题直接看样例进行分析,发现每一次出现的字符代表着用了1分钟来看这道题,每道题都有固定的解题时间,只要达到了这个解题时间,就可以将这题解出来,答案就要加上1;同时要注意将解决过的问题要标记一下;#in
  • 2023-12-20Codeforces Round 916 (Div. 3)(A~E2)
    A统计一下每个字母的出现次数然后输出即可#include<bits/stdc++.h>#definerep(i,a,b)for(registerinti=(a);i<=(b);++i)#definefep(i,a,b)for(registerinti=(a);i>=(b);--i)#definelsp<<1#definersp<<1|1#definePIIpair<int,int&