• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
magicat
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  算法基础

1 2 下一页
Educational Codeforces Round 7 A - E

摘要:# [Educational Codeforces Round 7](https://codeforces.com/contest/622) [TOC] ## [A - Infinite Sequence](https://codeforces.com/contest/622/problem/A) 阅读全文
posted @ 2023-09-04 00:57 magicat 阅读(35) 评论(0) 推荐(0)
Educational Codeforces Round 6 A - E

摘要:# [Educational Codeforces Round 6](https://codeforces.com/contest/620) [TOC] ## [A - Professor GukiZ's Robot](https://codeforces.com/contest/620/probl 阅读全文
posted @ 2023-09-03 02:15 magicat 阅读(24) 评论(0) 推荐(0)
Educational Codeforces Round 23 A - F

摘要:# [Educational Codeforces Round 23](https://codeforces.com/contest/817) [TOC] ## [A - Treasure Hunt](https://codeforces.com/contest/817/problem/A) 往四个 阅读全文
posted @ 2023-09-02 18:09 magicat 阅读(27) 评论(0) 推荐(0)
Educational Codeforces Round 15 A - E

摘要:# [Educational Codeforces Round 15](https://codeforces.com/contest/702) [TOC] ## [A - Maximum Increase](https://codeforces.com/contest/702/problem/A) 阅读全文
posted @ 2023-09-01 21:31 magicat 阅读(31) 评论(0) 推荐(0)
Educational Codeforces Round 5 A-E

摘要:# [Educational Codeforces Round 5](https://codeforces.com/contest/616) ![image](https://img2023.cnblogs.com/blog/2458891/202309/2458891-20230901195448 阅读全文
posted @ 2023-09-01 19:12 magicat 阅读(33) 评论(0) 推荐(0)
近段时间出现可以用multiset解决的题目

摘要:# 近段时间出现可以用multiset解决的题目 ## [AtCoder Beginner Contest 308 G Minimum Xor Pair Query](https://atcoder.jp/contests/abc308/tasks/abc308_g) 题意:有一个数组进行 $3$ 阅读全文
posted @ 2023-08-27 13:36 magicat 阅读(39) 评论(1) 推荐(1)
Codeforces Round 894 (Div. 3) ABCDEFG AK

摘要:# [Codeforces Round 894 (Div. 3)](https://codeforces.com/contest/1862) ![image](https://img2023.cnblogs.com/blog/2458891/202308/2458891-20230827125219 阅读全文
posted @ 2023-08-26 18:16 magicat 阅读(165) 评论(0) 推荐(0)
AtCoder Beginner Contest 308 A~F

摘要:AtCoder Beginner Contest 308 手速有点慢 A - New Scheme 判断给定数字是否满足条件 void solve() { bool ok = true; int a[10]; for(int i = 1; i <= 8; i++) cin>>a[i]; for(in 阅读全文
posted @ 2023-07-02 18:00 magicat 阅读(51) 评论(0) 推荐(1)
AtCoder Beginner Contest 302 ABCDEF

摘要:[AtCoder Beginner Contest 302](https://atcoder.jp/contests/abc302) ![image](https://img2023.cnblogs.com/blog/2458891/202306/2458891-20230621162021815- 阅读全文
posted @ 2023-06-21 16:20 magicat 阅读(47) 评论(0) 推荐(0)
AtCoder Beginner Contest 304 ABCDEF

摘要:[AtCoder Beginner Contest 304](https://atcoder.jp/contests/abc304) ![image](https://img2023.cnblogs.com/blog/2458891/202306/2458891-20230604120319565- 阅读全文
posted @ 2023-06-04 12:05 magicat 阅读(132) 评论(6) 推荐(1)
个人模板

摘要:Math & DP & Data structure & Graph & Geometry & Game 表演者: magicat 💕 nannan 目录 Math & DP & Data structure & Graph & Geometry & GameHead快读1快读2快读3模板1模板2 阅读全文
posted @ 2023-05-09 17:12 magicat 阅读(561) 评论(1) 推荐(1)
2023湖北省赛 VP 5题MCHJF + 1题K

摘要:2023湖北省赛 榜单 M 解方程 void solve() { ll x,y; cin>>x>>y; bool ok = false; ll z = x * 1000 - y; for(ll a = 0; a <= 1000000; a++) { ll t = a * 1000 - z; if(t 阅读全文
posted @ 2023-05-07 20:28 magicat 阅读(92) 评论(0) 推荐(0)
D. Solve The Maze

摘要:D. Solve The Maze 大意:建墙让所有好人可以到达坐标$(n,m)$,任何一个坏人都不能到达坐标$(n,m)$ 分析: 把坏人直接关起来,在坏人的四面建墙, 统计好人的人数 从坐标$(n,m)$去遍历,整个地图,看能不能遇到所有好人 3可以通过dsu, flood-fill等去做吧 细 阅读全文
posted @ 2023-04-21 16:59 magicat 阅读(44) 评论(0) 推荐(0)
湖南省第十八届大学生计算机程序设计竞赛(HNCPC2022)VP记录

摘要:随便记录下 湖南省第十八届大学生计算机程序设计竞赛(HNCPC2022) 官方题解 VP情况 队友卡I占了机时导致罚时有点爆炸,也是策略的失误 6题837罚时 补到GH就不补个位数题 J 判断斐波那契区间有没有一段的和等于$n$ 由于$n \leq 10^{15}$直接暴力即可 #include<b 阅读全文
posted @ 2023-04-17 11:35 magicat 阅读(1504) 评论(0) 推荐(0)
[USACO12MAR]Flowerpot S 单调队列

摘要:[USACO12MAR]Flowerpot S tag:单调队列 很惭愧,今天发现自己连滑动窗口都不会了,遂做了一些题 两滴水的高度之差大于等于D的情况下的最小花盆宽度 暴力思路:对于任意两点求水滴高度差是否大于等于D,若大于等于$D$则计算最下的两点距离 $w$ 但这显然是能过但不完全过,手玩一下 阅读全文
posted @ 2023-04-13 21:23 magicat 阅读(68) 评论(0) 推荐(0)
Educational Codeforces Round 3 个人总结A-E

摘要:[Educational Codeforces Round 3](https://codeforces.com/contest/609 "Educational Codeforces Round 3") A. USB Flash Drives + 降序排序后,贪心,甚至不会爆longlong ``` 阅读全文
posted @ 2023-01-28 17:02 magicat 阅读(57) 评论(1) 推荐(0)
Educational Codeforces Round 2 个人总结A-E

摘要:Educational Codeforces Round 2 A. Extract Numbers 简单的模拟 bool check(string op) { if(op.size()==1&&op[0]=='0') return true; if(op.size()==0||(op[0]<'1'| 阅读全文
posted @ 2023-01-28 01:44 magicat 阅读(60) 评论(0) 推荐(0)
P4053 [JSOI2007] 建筑抢修

摘要:P4053 [JSOI2007] 建筑抢修 tag:贪心,堆 一个堆A以 T2 为关键字 从小到大排序,另一个堆B记录 已维修的 的建筑的维修时间,用 cnt 记录总的维修时间(时刻?) 两种情况: 若可以维修,cnt 加下维修时间。 若不可以维修,从B中获取最大值mav, 还是两种情况,(1)满足 阅读全文
posted @ 2022-08-09 16:55 magicat 阅读(41) 评论(0) 推荐(0)
UVA227 谜题 Puzzle

摘要:UVA227 谜题 Puzzle 听过UVA输出格式有坑的,第一次做输入格式有坑的题,不愧是WF的题呀! 输入注意的细节挺多的,我以为是空格,结果是没有的 纪念一下 #include <bits/stdc++.h> using namespace std; int main() { int kase 阅读全文
posted @ 2022-05-08 20:52 magicat 阅读(75) 评论(0) 推荐(0)
UVA156 反片语 Ananagrams

摘要:传送门:UVA156 反片语 Ananagrams lrj 老师的代码我没有看,先是写了一个暴力,睡个午觉,起来再看 // AC one more times #include<iostream> #include<vector> #include<algorithm> #include<strin 阅读全文
posted @ 2022-04-29 13:11 magicat 阅读(55) 评论(0) 推荐(0)

1 2 下一页
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3