04 2022 档案

Terse princess (贪心)
摘要:原题链接:https://vjudge.csgrandeur.cn/problem/CodeForces-148C/origin #include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iost 阅读全文

posted @ 2022-04-29 10:39 zesure 阅读(20) 评论(0) 推荐(0) 编辑

A-candle(思维,枚举)
摘要:#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<queue> #include<bitset> #inclu 阅读全文

posted @ 2022-04-28 15:28 zesure 阅读(21) 评论(0) 推荐(0) 编辑

B - Non-square Equation
摘要:#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<queue> #include<bitset> #inclu 阅读全文

posted @ 2022-04-26 14:48 zesure 阅读(19) 评论(0) 推荐(0) 编辑

代码源div1 每日一题 二分答案
摘要:#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<queue> #include<bitset> typede 阅读全文

posted @ 2022-04-24 18:27 zesure 阅读(34) 评论(0) 推荐(0) 编辑

codeforce C. Boboniu and Bit Operations
摘要:#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<queue> #include<bitset> typede 阅读全文

posted @ 2022-04-24 13:54 zesure 阅读(24) 评论(0) 推荐(0) 编辑

Educational Codeforces Round 127 C - Dolce Vita
摘要:#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<queue> #include<bitset> typede 阅读全文

posted @ 2022-04-23 13:35 zesure 阅读(43) 评论(0) 推荐(0) 编辑

欧拉练习-2022/4/16
摘要:一开始是想二分做的,但实际上打一下表会发现欧拉函数不是单增性质 同时我们也可以发现当一个数是素数时,后面的非素数欧拉函数都不超过这个素数的欧拉函数,所以只需要线性塞找一下素数就好 #include<iostream> #include<cstdio> #include<cstring> #inclu 阅读全文

posted @ 2022-04-22 18:34 zesure 阅读(38) 评论(0) 推荐(0) 编辑

位运算的技巧
摘要:1.去掉最后一位 x>>1 2.在最后加一个0 x<<1 3.在最后加一个1 (x<<1)+1 4.把最后一位变成1 x|1 5.把最后一位变成0 (x|1)-1 6.最后一位取反 x^1 7.把右数第k位变成1 x|(1<<(k-1)) 8.把右数第k位变成0 x&(~(1<<(k-1))) 9. 阅读全文

posted @ 2022-04-19 22:28 zesure 阅读(51) 评论(0) 推荐(0) 编辑

N-Raksasa的数字
摘要:思路:用bitset快速转换二进制,用vector存储,根据抑或性质对每位进行运算 #include <bits/stdc++.h> using namespace std; #define inf 0x7ffffffffffffff #define N 1005000 #define mod 10 阅读全文

posted @ 2022-04-17 09:48 zesure 阅读(28) 评论(0) 推荐(0) 编辑

大连大学2022年4月程序设计竞赛-Raksasa的棋局
摘要:思路:多次查询的题应该打表 #include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<algorithm> #include<map> #include<cmath> typedef long lon 阅读全文

posted @ 2022-04-16 23:12 zesure 阅读(32) 评论(0) 推荐(0) 编辑

大连大学校赛-Raksasa的轻功
摘要:思路,用数组来存储下标连续坐标的最大位置,存储的不是某个状态的和而是坐标 #include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<algorithm> #include<map> #include< 阅读全文

posted @ 2022-04-16 22:45 zesure 阅读(33) 评论(0) 推荐(0) 编辑

矩阵快速幂板子
摘要:很多素材来自网上,仅为个人复习用 note 1: 矩阵乘法+快速幂解决 费波列切(不)数列问题 首先复习一下快速幂 快速幂代码 #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include<iostream> #i 阅读全文

posted @ 2022-04-14 16:08 zesure 阅读(44) 评论(0) 推荐(1) 编辑

我的新二分板子
摘要:while(l<=r){ mid=(l+r)>>1; if(check(mid)) ans=mid,r=mid-1; else l=mid+1; } 比原来那个好用多了( 阅读全文

posted @ 2022-04-14 16:03 zesure 阅读(11) 评论(0) 推荐(0) 编辑

-拓展欧几里得,以及乘法逆元
摘要:参考的大佬博客:详解扩展欧几里得算法(扩展GCD) - Seaway-Fu - 博客园 (cnblogs.com) (32条消息) 扩展欧几里得算法_zthgreat的博客-CSDN博客_扩展欧几里得算法 扩展欧几里得算法 - 知乎 (zhihu.com) 基本都是别人的内容,主要用于自用 欧几里得 阅读全文

posted @ 2022-04-14 16:02 zesure 阅读(26) 评论(0) 推荐(0) 编辑

Educational Codeforces Round 126 (Rated for Div. 2) C. Water the Trees
摘要:#include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<algorithm> #include<map> #include<cmath> typedef long long ll; using na 阅读全文

posted @ 2022-04-14 16:01 zesure 阅读(43) 评论(0) 推荐(0) 编辑

欧拉降幂
摘要:对于b很大这种情况,请使用欧拉降幂 首先介绍一下欧拉函数(此处用到一些网络资料) 同余符号含义两个整数a,b,若它们除以整数m所得的余数相等,则称a,b对于模m同余记作a≡b(mod m)读作a同余于b模m,或读作a与b关于模m同余。比如26≡14(mod 12)。 ll ol(ll n) { in 阅读全文

posted @ 2022-04-12 22:42 zesure 阅读(213) 评论(0) 推荐(0) 编辑

POJ-拯救行动
摘要:公主被恶人抓走,被关押在牢房的某个地方。牢房用N*M (N, M <= 200)的矩阵来表示。矩阵中的每项可以代表道路(@)、墙壁(#)、和守卫(x)。英勇的骑士(r)决定孤身一人去拯救公主(a)。我们假设拯救成功的表示是“骑士到达了公主所在的位置”。由于在通往公主所在位置的道路中可能遇到守卫,骑士 阅读全文

posted @ 2022-04-11 15:38 zesure 阅读(226) 评论(0) 推荐(0) 编辑

L - NP-hard
摘要:题目描述gk喜欢1,所以他想问你在nn的xx进制和nn的yy进制表示中哪个1多?如果nn的xx进制表示中1的个数大于nn的yy进制表示中1的个数输出>>,等于输出==,小于输出<< 输入格式第一行一个整数TT表示接下来有TT组测试样例.接下来T行,每行有三个整数n,x,yn,x,y(1≤t≤1000 阅读全文

posted @ 2022-04-09 20:30 zesure 阅读(63) 评论(0) 推荐(0) 编辑

lcm(
摘要:a/__gcd(a,b)*b 阅读全文

posted @ 2022-04-03 19:10 zesure 阅读(11) 评论(0) 推荐(0) 编辑

二分板子
摘要:供自己查找使用 int bsearch_1(int l, int r) { while (l < r) { int mid = l + r >> 1; if (check(mid)) r = mid; else l = mid + 1; } return l; }//用于查找左边界(范围内最小值 i 阅读全文

posted @ 2022-04-03 18:48 zesure 阅读(28) 评论(0) 推荐(0) 编辑

快速幂板子
摘要:#pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<algori 阅读全文

posted @ 2022-04-03 18:44 zesure 阅读(31) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

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