
算法记录
文章平均质量分 60
初期:杭州电子科技大学算法题目记录
Jingle_dog
这个作者很懒,什么都没留下…
展开
-
[POJ]week9.1
文章目录基本算法数据结构 参考 基本算法 OJ上的一些水题(可用来练手和增加自信) (POJ 3299,POJ 2159,POJ 2739,POJ 1083,POJ 2262,POJ 1503,POJ 3006,POJ 2255,POJ 3094) 枚举. (POJ 1753,POJ 2965) 贪心(POJ 1328,POJ 2109,POJ 2586) 递归和分治法. 递推. 构造法.(POJ 3295) 模拟法.(POJ 1068,POJ 2632,POJ 1573,POJ 2993,POJ 2996原创 2021-12-12 13:43:18 · 360 阅读 · 0 评论 -
[POJ]week9
文章目录简单搜索题目:2488.A Knight's Journey3083.Children of the Candy Corn3009.Curling 2.01321.棋盘问题2251.Dungeon Master 简单搜索题目: 深度优先搜索 (POJ 2488,POJ 3083,POJ 3009,POJ 1321,POJ 2251) 广度优先搜索(POJ 3278,POJ 1426,POJ 3126,POJ 3087.POJ 3414) 简单搜索技巧和剪枝(POJ 2531,POJ 1416,POJ原创 2021-12-12 13:06:55 · 481 阅读 · 0 评论 -
[HDU]week8
文章目录1238.Substrings1548.A strange lift深搜其它: 1238.Substrings find the largest string X, such that either X, or its inverse can be found as a substring of any of the given strings. 题意:找出所有串的最长的公共连续子串 思路:直接从最小的那串,枚举所有子串去寻找 #include <stdio.h> #include &l原创 2021-11-30 17:28:57 · 233 阅读 · 0 评论 -
[HDU]week7
文章目录1000.A + B Problem 1000.A + B Problem #include<stdio.h> int main(){ int a,b; while(~scanf("%d %d",&a,&b)){ printf("%d\n",a+b); } return 0; }原创 2021-11-12 21:51:00 · 618 阅读 · 0 评论 -
[HDU]week6
1231.最大连续子序列 #include <stdio.h> // 动态规划 #include <iostream> #include <algorithm> using namespace std; typedef struct{ int start,end; int weight; //从i到k的最大子序列长度 状态迁移函数:t[i].weight=t[i+1].weight+arr[i] i在序列中 }xulie; xulie t[10005原创 2021-11-07 21:01:27 · 322 阅读 · 0 评论 -
[HDU]week5
题目地址 7131.Nun Heh Heh Aaaaaaaaaaa #include <iostream> #include <cstring> using namespace std; typedef long long ll; const ll mod = 998244353; int dp[100005][10]; ll mod_pow(ll n) //使用快速幂运算求2^n % mod { ll ans = 1, a = (ll)2; while (n原创 2021-11-02 14:32:40 · 146 阅读 · 0 评论 -
[HDU]week4
1263.水果 #include<iostream> #include<string> #include<map> using namespace std; //map<string,map<string,int>>这种比较新奇,解决了三个变量的键值对应 struct MyStruct { map <string, int>MyStructma; //存放水果名以及该种水果的数量 }; int main() { map <原创 2021-10-19 17:03:19 · 168 阅读 · 0 评论 -
[HDU] week2
杭电链接 1004 #include<stdio.h> #include<string.h> int main(void) { char color[1001][25]; int max, count[1001], i, j, n, k; while (scanf("%d", &n) && n != 0) { for (i = 0; i < n; i++) scanf("%s",原创 2021-09-14 23:00:57 · 126 阅读 · 0 评论 -
[HDU] week1.1 - A+B系列
航电链接 1089. A+B for Input-Output Practice (I) #include <stdio.h> int main(){ long long a,b; while(scanf("%lld %lld",&a,&b)==2){ printf("%lld\n",a+b); } return 0; } 1090. A+B for Input-Output Practice (II) #include <原创 2021-09-14 14:54:02 · 108 阅读 · 0 评论 -
[HDU] week1.2
航电链接 1001. Sum Problem #include <stdio.h> int main() { int n,sum; while(scanf("%d",&n)!=EOF){ sum=n*(n+1)/2.0; //sum=n/2.0*(n+1); printf("%ld\n\n",sum); } return 0; } 1061. Rightmost Digit #include <原创 2021-09-14 14:58:47 · 102 阅读 · 0 评论