上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 95 下一页
摘要: 简介 对cmp的理解能力 常规题 code #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; struct Student{ int idx; int n 阅读全文
posted @ 2021-06-28 13:46 HDU李少帅 阅读(51) 评论(0) 推荐(0)
摘要: 简介 用传统的算法, 可能要用到递归栈, 什么鬼. 太难记了 还是python香. code a=input() a = a.replace('{', '(') a = a.replace('}', ')') a = a.replace('[', '(') a = a.replace(']', ') 阅读全文
posted @ 2021-06-28 10:59 HDU李少帅 阅读(66) 评论(0) 推荐(0)
摘要: 简介 c = c++ ? c = ++c ? code #include <iostream> #include <string> using namespace std; int main() { long long n; while(cin >> n) { bool pre = true; in 阅读全文
posted @ 2021-06-28 09:50 HDU李少帅 阅读(47) 评论(0) 推荐(0)
摘要: 简介 动态规划问题。 对于贪心无法解决的问题, 要第一时间想到动态规划问题的解法。 但是对于动态规划问题, 你要想的是使用dp[] 还是 dp[][] 其中每个dp元素表示的意义 这题的dp[i] 表示的是, 从0开始的桩子到 i 个桩子 , 从小到大最大的序列。 dp[i] = max(dp[i] 阅读全文
posted @ 2021-06-28 09:36 HDU李少帅 阅读(53) 评论(0) 推荐(0)
摘要: 简介 使用匈牙利算法进行匹配 code #include <stdio.h> #include <string.h> #include <stdlib.h> #include <limits.h> #include <math.h> #include <algorithm> #include <ve 阅读全文
posted @ 2021-06-27 22:05 HDU李少帅 阅读(81) 评论(0) 推荐(0)
摘要: 简介 简单题, 但是作者写的很巧妙, 参考答案. code #include <stdio.h> #include <string.h> int main(void) { char str[1000]={0},temp[1000]={0}; while(gets(str)) { int i,j,k= 阅读全文
posted @ 2021-06-27 22:00 HDU李少帅 阅读(57) 评论(0) 推荐(0)
摘要: 简介 比较好的动态规划的题目. code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); while 阅读全文
posted @ 2021-06-27 19:26 HDU李少帅 阅读(54) 评论(0) 推荐(0)
摘要: 简介 多线程的同步是所有的公司都会使用的. 先将各种语言的放上来 code #include <iostream> #include <thread> #include <mutex> #include <string> using namespace std; string g; mutex mt 阅读全文
posted @ 2021-06-27 18:36 HDU李少帅 阅读(87) 评论(0) 推荐(0)
摘要: 简介 找规律, 而不是盲目转弯, 这样太慢. code 参考了题解 #include <iostream> #include <vector> using namespace std; int a[101][101]={0}; int main() { int n; vector<int> b; w 阅读全文
posted @ 2021-06-27 17:06 HDU李少帅 阅读(39) 评论(0) 推荐(0)
摘要: 简介 使用回溯 + 暴力 code #include <iostream> #include <string> #include <map> #include <vector> using namespace std; bool flag = false; char v[4]={'+', '-', 阅读全文
posted @ 2021-06-27 15:12 HDU李少帅 阅读(46) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 95 下一页