- 博客(8)
- 收藏
- 关注
原创 题目汇总(总结篇)
标题:习题汇总文章目录标题:习题汇总标题:搜索dfs(复杂度n!)()标题 区间dp(2021/2/7)标题B. One Bomb(2021/2/23)标题:rating 赛 B. Beautiful Numbers(2021/2/27)标题:B g2g c u l8r(2021/3/14)标题:CTip to be Palindrome(2021/3/14)标题:搜索dfs(复杂度n!)()#include<stdio.h>#include<string.h>#inclu
2021-03-14 22:59:40 300
原创 题补汇总
标题:题补:2021年度训练联盟热身训练赛第二场题目网址文章目录标题:题补:2021年度训练联盟热身训练赛第二场标题:B g2g c u l8r标题:C: Tip to be Palindrome标题:B g2g c u l8r题目大意:给一个数字N;接下来有n行;每一行的第一个字母或单词是后面的索引;再给一个数字m,代表接下来有m行再给出的单词或字母出现过索引就用这个索引后的来替代:这个用map来存会比较好:#include<iostream>#include<cmath
2021-03-14 22:31:28 104
原创 笔记
标题:同余&&扩展欧几里得习题链接这题还有一个转换:原题是求解 ax≡1(b); 问题是如何转换成 ax+by=1这种形式已知:ax%b=1%b 所以(ax-1)%b=0%b=0所以可知:ax-1=by;所以ax-by=1;==>ax+by=1;就快乐地变成了扩展欧几里得算法:扩展欧几里得加配属定理ax+by=d;方程有解的话说明gcd(a,b)|b;ax1+by1=d;bx2+(a%b)y2=d;a%b=a-(a/b)*b;整理得:x1=y2; y1=
2021-03-06 22:54:36 105
原创 All the Vowels Please
标题: All the Vowels PleaseB. All the Vowels Pleasetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTom loves vowels, and he likes long words with many vowels. His favorite words are vowelly words. We
2021-03-05 09:39:40 209 1
原创 3n+1
标题:3n+1; 题目网址简述标题大意:给一个数,如果这个数是偶数的话,那么将这个数除以二,如果是奇数的话,就将这个数乘以3加上1;当这个数为1是就结束;具体例子:n = 22: 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1而问题是i,j当中所有数当中的最长长都为多少?上AC代码:#include<stdio.h>#include<string.h>#include<stdlib.h>#include<mat
2021-03-03 13:07:28 135
原创 字符加(int)强制转换
标题:字符加(int)强制转换:添加链接描述:一道题的网站这个题是真的妙:如果直接暴力的写法:首先将这两个字符串连在一起;然后遍历一次,可惜最后一个点超时#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>char str1[2000001];char str2[1000005];int main() { gets(str1); gets(str2)
2021-02-28 23:56:13 1088
原创 https://codeforces.com/problemset/problem/1265/Brating 赛 补提
标题:rating 赛 补提B. Beautiful Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation p=[p1,p2,…,pn] of integers from 1 to n. Let’s call the number m (1≤m≤n) beautiful, if t
2021-02-27 12:34:53 312
原创 标题dp入门
标题dp入门1 上升子序列最大和;最大字串和(连续最大子序列和);最长上升子序列;最长公共子序列;先说说我对与这个东西的理解吧,说实话从写这玩意到现在就一直没有思路,昨天和和今天好像有了一点新的认识,就写了一点自己的见解;标题1:先说说上升子序列最大和的问题吧;https://vjudge.net/problem/HDU-1087(这是一道比较入门的题,想写的可以去看看,练练手);3 1 3 24 1 2 3 44 3 3 2 115 1 8 88 49 78 57 48 7 3 4 4 8
2021-02-07 16:32:09 78
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人