文章分类 - OI题目
摘要:f[n]=2*f[n-1]+2 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/stdc++.h> #define ll long long #define ddd pri
阅读全文
posted @ 2023-07-13 08:16
JMXZ
摘要:/* 3 1 2 9 15 */ #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/stdc++.h> #define ll long long #define ddd pr
阅读全文
posted @ 2023-07-12 22:07
JMXZ
摘要:/* 3 10 7 */ #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/stdc++.h> #define ll long long #define ddd printf
阅读全文
posted @ 2023-07-12 20:20
JMXZ
摘要:->分析题目-> vis[i][j] ->最短路 floyd ->方便+100^3 ->dij->单源最短 ->floyd->两点见最短->用于任何图,不管有向无向,边权正负,但是最短路必须存在。(不能有个负环) #include<bits/stdc++.h> using namespace std
阅读全文
posted @ 2023-07-12 11:52
JMXZ
摘要:->( )可以不连续 + 移动 编号是 b1,b2..... -> 相同数的个数最多的 可以通过 旋转 +圈可以反转移动 -> 其他的数可以 通过编号 连成一个圈 与原来的 圈一样 -> 构造圈+自己的语言做+翻译->count ! 圈的性质 ->反转+移动 #include<cstdio> #in
阅读全文
posted @ 2023-07-12 08:20
JMXZ
摘要:递推方程显然-》高精即可 高精 -》 将数倒置存储 -》递推方程 -》边界条件 /* 4 2 1231 62 6 2 356510 107100 */ #include<cstdio> #include<cstring> #include<iostream> #include<algorithm>
阅读全文
posted @ 2023-07-12 00:20
JMXZ
摘要:dfs-> dp[i]=max(dp[i],dp[i-k]+∑-cost[ last ]) #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/stdc++.h> #defin
阅读全文
posted @ 2023-07-11 08:46
JMXZ
摘要:https://www.luogu.com.cn/problem/P1074 -> 八皇后 ->判断 位置 -》hang lie gong->已知可以算 tmp_have ->==0 ->记录点的信息 s[i][0--3] 可以预处理->cnt -》dfs -》优化 -》从少的dfs -》记录rou
阅读全文
posted @ 2023-07-09 14:58
JMXZ
摘要:1.不选,然后去考虑下一个 2.选且只选这个主件 3.选这个主件,并且选附件1 4.选这个主件,并且选附件2 5.选这个主件,并且选附件1和附件2. dfs havent work it out wait to work /* 1000 5 800 2 0 400 5 1 300 5 1 400 3
阅读全文
posted @ 2023-07-08 14:09
JMXZ
摘要://ans=0 first -> 0 second use define //gcd(m,n) dont using / #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/s
阅读全文
posted @ 2023-07-08 10:11
JMXZ
摘要:-> k is small <=4 -> point is limited 1.枚举矩形包围点 500^4 舍弃 -> dfs 2.dp -> k ->无状态 3.->枚举点加入 ( add -> cross /in_node ->if_cross ) dfs -> ans-> get() /* 4
阅读全文
posted @ 2023-07-07 09:01
JMXZ
摘要:在范围内,去油价最便宜的地方 1. 更便宜 最近最好 刚好用完 2.////////// 加满 先有架构 -》 边界问题 /* 275.6 11.9 27.4 2.8 2 102.0 2.9 220.0 2.2 26.95 200.0 100.0 2.0 4.00 2 50.0 3.00 60.0
阅读全文
posted @ 2023-07-06 14:36
JMXZ
摘要:证明 n-1进制 1.只缺一个 显然 2.缺>=2 1.缺1 -》 an+ai >an 且有n种可能 则一定两位数 1ai 所以一定有 1 2.缺其他 无1 -》显然不符 所以完整 -》 得证 ERROER check //再写if时 判断条件写全 //设置变量时,搞明白具体含义,在纸上写出来 /*
阅读全文
posted @ 2023-07-06 09:31
JMXZ

浙公网安备 33010602011771号