QFNU-ACM 2020.04.05个人赛补题】的更多相关文章

A.CodeForces-124A (简单数学题) #include<cstdio> #include<algorithm> #include<iostream> #include<cmath> using namespace std; int main(){ int a,b,n; scanf("%d %d %d",&n,&a,&b); if((n-a)>b){ printf("%d",b…
A Vasya studies music.He has learned lots of interesting stuff. For example, he knows that there are 12 notes: C, C#, D, D#, E, F, F#, G, G#, A, B, H. He also knows that the notes are repeated cyclically: after H goes C again, and before C stands H. …
D - D CodeForces - 743A Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds: the question Vladik face now is to find the cheapest way to get to the olympiad. V…
B - B Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters. Let A be a set of positions in the string. Let's call it pretty if following conditions are met: lett…
D - Drinks Choosing Old timers of Summer Informatics School can remember previous camps in which each student was given a drink of his choice on the vechorka (late-evening meal). Or may be the story was more complicated? There are nn students living…
B - A Tide of Riverscape 题意:给出一组字符串,由'0','1',' . '组成,' . '可以换成 0或1,判断第 i  个和第 i+p 个字符是否可以不相等,如果可以则输出满足条件的字符串 题解:先把所有的' . '换成0或1,在判断 i 和i+p 以及i 和 i-p 是否一样,一样则把原来的' . '换成相反的1 或0 ,最后判断是否有一组周期为p的点不同 #include<bits/stdc++.h> using namespace std; int main(…
果然是力扣杯,难度较于平时周赛提高了不少,个人感觉最后两题并不太容易QAQ LCP 18.早餐组合 #二分思想 题目链接 题意 你获得了每种主食的价格,及每种饮料的价格,你需要选择一份主食和一份饮料,且花费不超过\(x\)元.现要求购买方案数. 分析 先分别对主食与饮料进行排序.枚举主食的价格,得出饮料最高价格,再二分寻找这一价格对应的饮料编号,小于该编号的饮料均能够与当前主食进行搭配.同理,枚举饮料价格,再二分对应主食价格.时间复杂度为\(O(nlogn)\).速度并不快,可以用空间换取时间,…
慢慢来. 题目册 题目 A B C D tag math strings greedy dp 状态 √ √ √ √ //∅,√,× 想法 A. CME res tp A 题意:有\(n\)根火柴,额外填上\(k(k≥0)\)根火柴棍,使得\(n+k\)能分成三份\(a,b,c\),每份至少有一根火柴,满足\(a+b = c\),问\(k\)最小是多少 满足方程 \(a+b+c = n+k\) \(a + b = c\) 得\(2*c = n+k\) 若\(n\)是偶数,那么\(k\)为零,反之\…
今天第一场个人训练赛的题目有点恐怖啊,我看了半个小时多硬是一道都不会写.我干脆就直接补题去了.... 先补的都是简单题,难题等我这周末慢慢来吧... A Calandar Time Limit: 1 Second      Memory Limit: 65536 KB http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4113 题目意思很明确:给出一个日期和对应的星期几,求出另一个所给的日期是星期几. 题目已经简化了,12个…
补题地址:https://zjusummer.contest.codeforces.com/ Contents ZJU-ICPC Summer 2020 Contest 1 by Group A Problem A. MUG Problem B. Count Angles Problem F. Balloons Tower Defence ZJU-ICPC Summer 2020 Contest 2 by Group B Problem A. The Number of Good Interva…