10 2024 档案

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

点击右上角即可分享
微信分享提示