会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
WeiAR
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
12
13
14
···
56
下一页
2020年9月6日
多边形裁剪
摘要: #include<opencv2/core/core.hpp> #include<opencv2/imgproc/imgproc.hpp> #include<opencv2/highgui/highgui.hpp> #include<opencv2/opencv.hpp> #include<bits
阅读全文
posted @ 2020-09-06 10:42 WeiAR
阅读(276)
评论(0)
推荐(0)
2020年8月23日
Gym - 101848D
摘要: 先把 1,10,100,1000,...这些数拿出来那么还剩下2^n-n个数,子集个数为2^(2^n-n),if k:对于任何一个子集,base都可以用唯一的方案凑出来else !k:会出现一个空集的情况,要-1另外用扩展欧拉公式降幂的时候,主要使用条件 #include <bits/stdc++.
阅读全文
posted @ 2020-08-23 09:51 WeiAR
阅读(128)
评论(0)
推荐(0)
2020年8月22日
CodeForces - 715B
摘要: CodeForces - 715B 先判断impossible的情况1. 0边全赋值为1,此时最短路>L2. 0边全赋值为inf,此时最短路<L 我们按读入顺序对0边进行排列,然后我们二分找到第一个必经0边,假设它在0边中的下标是第i个,那么1~i的0边为1,i+1~cnt的0边为inf(就是这些边
阅读全文
posted @ 2020-08-22 09:57 WeiAR
阅读(112)
评论(0)
推荐(0)
2020年8月14日
为什么欧拉图要用栈存然后逆着输出
摘要: 为什么欧拉图要用栈存然后逆着输出41 21 33 44 1考虑这样一组样例,你就可以发现,如果是第一种方式输出为1 2 3 4 1显然是不对的,第二种是对的主要的影响还是在欧拉路和欧拉回路上
阅读全文
posted @ 2020-08-14 17:37 WeiAR
阅读(162)
评论(0)
推荐(0)
2020年8月8日
The Flee Plan of Groundhog
摘要: The Flee Plan of Groundhogdfs相向而行就距离-3,时间+1背道而驰就距离-1,时间+1注意土拨鼠可以不走,特判就好 #include <bits/stdc++.h> #define inf 2333333333333333 #define N 1000010 #defin
阅读全文
posted @ 2020-08-08 15:42 WeiAR
阅读(294)
评论(0)
推荐(0)
Groundhog Looking Dowdy
摘要: https://ac.nowcoder.com/acm/contest/5674/F 做法:伪单调队列按值升序排序,如果够m了就更新答案同时pop队首 #include <bits/stdc++.h> #define inf 2333333333333333 #define N 3000010 #d
阅读全文
posted @ 2020-08-08 14:56 WeiAR
阅读(188)
评论(0)
推荐(0)
Groundhog and 2-Power Representation
摘要: Groundhog and 2-Power Representation 牛客多校A python + 栈乱搞 ans=0 c=list(input()) n=int(len(c)) c.insert(0,'s') k=[] ans=[] tot=int(0) def ksm(a,b): r=int
阅读全文
posted @ 2020-08-08 13:36 WeiAR
阅读(181)
评论(0)
推荐(0)
2020年8月7日
P3704 [SDOI2017]数字表格
摘要: #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #include <cmath> #include <cstring> #define inf 2147483647 #define N 10000
阅读全文
posted @ 2020-08-07 14:25 WeiAR
阅读(137)
评论(0)
推荐(0)
P3327 [SDOI2015]约数个数和
摘要: #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #include <cmath> #include <cstring> #define inf 2147483647 #define N 10000
阅读全文
posted @ 2020-08-07 11:07 WeiAR
阅读(109)
评论(0)
推荐(0)
2020年8月6日
P2257 YY的GCD
摘要: 第一次做的时候没有优化到底,T了 我竟然蠢蠢地去枚举质数了 #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #include <cmath> #include <cstring> #define
阅读全文
posted @ 2020-08-06 22:03 WeiAR
阅读(90)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
13
14
···
56
下一页
公告