自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 1005 Spell It Right (20分) PTA(Advanced Level) Practice

#include<iostream> #include<algorithm> #include<sstream> using namespace std; typedef long long ll; string English[10]={"zero","one","two","three","four","five","six","seven","eight","nine"}; string itos(int a){ string s; stringstream.

2020-08-13 01:18:33 123

原创 1041 Be Unique (20分) PTA(Advanced Level) Practice

样例1 输入 7 5 31 5 88 67 88 17 输出 31 . 样例2 输入 5 888 666 666 888 888 输出 None #include<iostream> #include<algorithm> #include<map> using namespace std; typedef long long ll; map<int,int>Map; int main() { int N,a[100009]; cin>&gt..

2020-08-12 21:49:38 158

原创 十一届蓝桥杯省赛B组c/c++ 试题E 矩阵

dfs肯定跑不出来 这种一般都是动态规划 左边的数小 上边的数小 对于每个新的数 要么紧挨着放在上边一行 要么紧挨着放在下边一行 如果放在下边,当然前提是上边有数才行 dp【i】【j】:上边i个数,下边一行j个数的可能的情况数 初始:dp【0】【0】=1 上边一行和下边一行都没数的情况算一种 一个新的数 dp【i】【j】 放在上边 dp【i】【j】+= dp【i-1】【j】 放在下边 dp【i】【j】+= dp【i】【j-1】 放之前要判断 填完这个 1010*1010 的表最后的 dp【..

2020-08-12 21:36:15 2316 6

原创 十一届蓝桥杯省赛B组c/c++ 试题I 整数拼接

先是 部分 分数 的代码 , 后面是优化的思路和代码 #include<iostream> #include<algorithm> using namespace std; int n,K,a[1001],ans=0; bool Merge(int i,int j){//第i个数和第j个数拼接 是否符合条件 int t=a[j],cnt=1; while(t!=0){ cnt*=10; t/=10; } if((a[i]*cnt+a[j])%K==0) .

2020-08-12 21:00:55 572 1

原创 十一届蓝桥杯省赛B组c/c++ 试题G 解码

#include<iostream> #include<algorithm> using namespace std; int main() { string s,ans; cin>>s; for(int i=0;i<s.length();i++) { int k=s[i]-'0'; if(k<10&&k>1) for(int j=1;j<k;j++) ans+=s[i-1]; else .

2020-08-12 16:57:38 245

原创 十一届蓝桥杯省赛B组c/c++ 试题H 走方格

dfs可以做, 但是建议,递推肯定不会超时 #include<iostream> #include<algorithm> using namespace std; typedef long long ll; #define MAX 10000 const ll INF=1e9; int n,m,ans=0; int a[31][30]; int main() { cin>>n>>m; a[1][1]=1; for(int i=1;i<=n;..

2020-08-12 16:33:00 346

原创 1027 Colors in Mars (20分)PTA(Advanced Level) Practice

1027 Colors in Mars (20分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2

2020-08-09 23:38:07 74

原创 1002 A+B for Polynomials (25 分) PTA(Advanced Level) Practice

Sample Input: 2 1 2.4 0 3.2 2 2 1.5 1 0.5 Sample Output: 3 2 1.5 1 2.9 0 3.2 #include<iostream> #include<map> using namespace std; map<int,double>M; int n,Max=-1; void d(){ cin>>n; for(int i=0;i<n;i++){ int a; double b; .

2020-08-09 16:28:31 135

原创 UE4 静态网格体碰撞 Collision Prims:0

问题: 问题出现过程: 制作贪吃蛇案例,食物是自己建的,蛇头碰到食物后出现检测不到的问题。 食物是用笔刷创建几何体(一个椭圆球减去下半部分) 组合得到的形状 (形状见下面图) 然后创建了静态网络物体 一个蓝图类里添加这个静态网格体 如图 出现碰撞模拟检测 检测不到这个蓝图的问题 而新建的测试蓝图,点击绿色添加组件, 添加的 Cube则可以被检测到 对比发现 笔刷创建那个 静态网格体显示 Collision Prims:0 如图:图片是改好的,之前 Collision Prims:0 且为黄色,感觉是这

2020-08-06 04:38:32 2050 2

原创 并查集 模板-食物链

//并查集 // //查询 是否在同一个组 //合并 这两个组 #include<iostream> #include<algorithm> using namespace std; typedef long long ll; const int N=100; int head[N]; int rank[N]; void init(int n){ for(int i=...

2020-02-04 11:25:37 86

原创 动态规划 完全背包问题 zzzz

//完全背包问题 #include<iostream> #include<algorithm> using namespace std; int dp[4][8]; int main() { int n=3;//3种物品 int W=7;//7个容量 int w[4]={0,3,4,2}; int v[4]={0,4,5,3}; //dp[i][j]:表示 ...

2020-02-03 16:25:45 105

原创 棋盘多项式 递归搜索

棋盘多项式 问题描述   八皇后问题是在棋 盘上放皇后,互相不攻击,求方案。变换一下棋子,还可以有八车问题,八马问题,八兵问题,八王问题,注意别念反。在这道题里,棋子换成车,同时棋盘也得 换,确切说,是进行一些改造。比如现在有一张n*n的棋盘,我们在一些格子上抠几个洞,这些洞自然不能放棋子了,会漏下去的。另外,一个车本来能攻击和它 的同行同列。现在,你想想,在攻击的过程中如果踩到一个洞,便会自取灭...

2020-02-03 13:47:18 417

原创 HPU‘s birthday

HPU’s birthday 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 2019.10.20 is the 110th birthday of HPU. On that day, you can see the string “110” everywhere. Hery is ...

2020-02-03 13:23:07 179

原创 Xor Path 树路径异或

Xor Path 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 In graph theory, if an undirected gragh G(V, E) without cycle has n vertices, n − 1 edges and the graph is conne...

2020-02-03 12:54:20 221

原创 数组模拟邻接表 链式向前星

原理和想法在注释里 //数组模拟邻接表 //链式向前星 #include<iostream> #include<cstring> using namespace std; class node{ public: int from; int to; int other;//权重啊其他的啥的 int next;//存该边起点的出边的上一条出边 的序号 }e...

2020-02-01 18:21:05 162 1

原创 c++字符串翻转 的函数

#include reverse(a.begin(),a.end()); #include strrev(s);

2020-02-01 16:29:01 247

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除