摘要:
题目链接:hiho1080 直接看代码吧,两个标记分开处理 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define ll long long 4 #define mod 1000000007 5 #define pi (4*atan(1. 阅读全文
摘要:
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1284 比较基础练一下。 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #inc 阅读全文
摘要:
之前一直比较恐惧dp的题,暑假之前好好从头补一下。 题目链接:HihoCoder - 1037 数字三角形 dp[i][j]表示到第i层第j个房间时累计收集到的最大值,从上到下记忆化搜索即可 状态转移:dp[i][j]=max(dp[i-1][j],dp[i-1][j-1])+m[i][j]; 1 阅读全文
摘要:
开始搞ac自动机啦 之前看着费劲的现在轻易就理解了,剩下的就是多做题了 加油!!! 先来个模板题 题目链接:HihoCoder - 1036 1 #include <cstdio> 2 #include <cstring> 3 const int maxn=1000010; 4 5 int n; 6 阅读全文
摘要:
CodeForces - 807A 这就没什么说的了,好好读题就行。 1 #include<cstring> 2 #include<cstdio> 3 #include<bits/stdc++.h> 4 using namespace std; 5 6 int main() 7 { 8 int n; 阅读全文
摘要:
两个星期没有刷题了,,从今天开始吧,先从hiho开始刷,巩固一下之前学的。。 Trie树专题。。 题目链接:HDU - 1075 题意:给出火星文单词对应的英文单词,输入一段火星文,输出英文。 用trie树做,节点挂上对应的中文单词。 也可以用map做。 1 #include <cstdio> 2 阅读全文
摘要:
有空再来整理: QMessageBox 状态栏: 容器迭代方式: 阅读全文