10 2024 档案
摘要:A.贵校是构造王国吗I 众所周知,你们正在参加中国构造题竞赛(Chinese Constructive Problem Contest, CCPC),毫无疑问,命题学校中山大学身为构造王国非常希望你们去挑战一些相关的问题。 给定一个 的网格,你需要将
阅读全文
摘要:比赛链接:https://codeforces.com/contest/2026 A. Perpendicular Segments 题目说了必定有答案,不妨想一想对于 来讲,最大值肯定是相应数构成得正方形得对角线最大,其一定大于等于 ,既然最小的正方形满足 直接都取最小的正方形
阅读全文
摘要:题目链接:https://codeforces.com/contest/2008/problem/H 首先想了一会,随后想到了取模,但是由于这个q太大于是考虑是否可以实现动态变化最后还是没得出结果,遂看了题解。 原来这道题由于n的限制,所以可以对求出取模所对应的余数的取模区间 \([k*x,k*x+
阅读全文
摘要:比赛链接:https://codeforces.com/contest/2033 A. Sakurako and Kosuke 直接模拟好吧(直接奇偶性就好了) #include<iostream> #include<queue> #include<map> #include<set> #inclu
阅读全文
摘要:比赛链接:https://codeforces.com/gym/104976 D.Operator Precedence 队友解的,想办法让第二个式子中括号内数值为1,所以就2,-1交替,最后一个选1可逆推,第一个为2*n-3 #include<iostream> #include<queue> #
阅读全文
摘要:比赛链接:https://codeforces.com/contest/2013/problem A. Zhan's Blender 一次最多可以榨汁 水果,答案得解 #include<iostream> #include<map> #include<set> #include
阅读全文
摘要:比赛链接:https://codeforces.com/gym/105383/problem A. Animal Farm 找个最大pig,然后所有比他小的其他种类生物一直加就好了 #include<bits/stdc++.h> using namespace std; typedef long l
阅读全文
摘要:比赛链接:https://codeforces.com/contest/2030 A. A Gift From Orangutan 肯定最小值和最大值放前面最好,答案得解 #include<iostream> #include<string.h> #include<map> #include<vec
阅读全文
摘要:题目链接:https://codeforces.com/contest/1859 A. United We Stand 选最大的数即可注意题目输出格式 #include<iostream> #include<string.h> #include<map> #include<vector> #incl
阅读全文
摘要:题目链接:https://codeforces.com/contest/1858 A. Buttons 从自身角度出发,我想赢就得保证我的按钮尽可能多所以,大家都优先按 ,然后分析先后顺序即可 #include<iostream> #include<string.h> #include<ma
阅读全文
摘要:比赛链接:https://codeforces.com/contest/2025 A. Two Screens 看前面最长相同前缀,如果有就前缀长+1+剩余长度,否则直接两个字符串长度相加 #include<iostream> #include<string.h> #include<map> #in
阅读全文
摘要:题目链接:https://codeforces.com/contest/1882 A. Increasing Sequence 从1开始慢慢和 的所有值比较,注意最后一个位置特判下 #include<iostream> #include<string.h> #include<map>
阅读全文
摘要:A. Simple Palindrome aeiou,如果这里后面+u则会多出2,+o则会多3,通过分析加相同的字母比加之前存在的不同字母赚 发现同一个太多了,又会增太大,遂平均分配,使增多幅度上升的缓慢 #include<bits/stdc++.h> using namespace std; ty
阅读全文
摘要:题目链接:https://qoj.ac/contest/1480 这次有个强队去讲课,偶幸校队赛时第一 C - Catch You Catch Me 队友写的,签到题吧? #include<bits/stdc++.h> #define endl '\n' using namespace std; t
阅读全文
摘要:赛时依然和本校强队差两题 比赛链接:https://codeforces.com/gym/104901 A. Many Many Heads 这里先用栈处理好第一个状况,然后根据层数进行第二个状况是否存在判断 #include<bits/stdc++.h> using namespace std;
阅读全文
摘要:这次double精度上卡了,赛时和学校强队差两题 题目链接:https://codeforces.com/gym/104023/problem A. Dunai 队友写的,答案在总冠军位人数和位置上冠军加非冠军人数最小取min? #include<bits/stdc++.h> #define tes
阅读全文
摘要:比赛链接:https://www.luogu.com.cn/contest/179008 A.Strange Cake Game 对于小W,往下走最赚,对于小M往右走最赚,于是路线形成了个折线,直接对应竖坐标位置去看看横坐标符不符合要求即可 #include<iostream> #include<a
阅读全文
摘要:比赛链接https://www.luogu.com.cn/contest/126344 [APC001] A - CT 不必多说,多次取模 #include<iostream> #include<algorithm> #include<string> #include<string.h> #incl
阅读全文