自定义博客皮肤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)
  • 收藏
  • 关注

原创 有列表的短信界面

一、要求制作一个短信界面,可以点击进入不同的短信界面,长按可以删除,右上角点击有菜单。二、关键得分点:目录页面和内容界面的布局、两类页面间的跳转功能;选项菜单的布局、上下文菜单的布局和功能。三、界面(一会儿再贴图)四、主要思路设置了一个List界面为初始总界面,四个分别的短信界面,短信界面延续上一次作业的内容,稍作更改。关于列表。使用SimpleAdapter,通过setOnItemClickListener实现单击某个item后实现界面跳转。其中,listItem为一个数组,保存每个it

2020-11-03 19:45:19 263

原创 Linearlayout中控件靠右/靠下

这个是短信界面中根据字数调整大小的对话框:<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" 都必须是wrap android:layout_gravity="right"> <TextView android:id="@+id/xianshi" android:layout_width="wrap

2020-10-28 20:17:17 2831

原创 简易计时器程序--多线程和异常处理

题目描述:按下启动按钮,计时器启动,每隔一秒更新到TextView中,直到按下停止按钮。代码:package dhu.cst.liyiqing181310505.chp401;import androidx.annotation.NonNull;import androidx.appcompat.app.AppCompatActivity;import android.os.Bundle;import android.os.Handler;import android.os.Messag

2020-10-28 20:08:14 1517 5

原创 HDU 2553 N皇后(DFS递归)

题目Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正整数,表示对应输入行的皇后的不同...

2019-07-13 13:53:57 207

原创 HDU 1312 Red and Black (DFS BFS)

题目Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adja...

2019-07-13 11:16:05 169

原创 HDU 1062 Text Reverse (reverse)

题目Problem DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.InputThe input co...

2019-07-12 15:58:05 100

原创 HDU 1702 ACboy needs your help again!(栈和队列)

题目Problem DescriptionACboy was kidnapped!!he miss his mother very much and is very scare now.You can’t image how dark the room he was put into is, so poor

2019-07-12 15:48:14 85

原创 HDU 1276 士兵队列训练问题 (链表和list)

题目代码我的代码:#include <bits/stdc++.h>using namespace std;int main (){ int N,n; cin>>N; vector <int> people; while (N--) { cin>>n; people....

2019-07-12 15:38:50 307 2

原创 HDU 2648 shopping (map)

题目代码#include <bits/stdc++.h>using namespace std;int main (){ int n,m; map <string,int> shop; while(cin>>n) { int N=n; string str; while (...

2019-07-12 15:30:48 129

原创 HDU 1027 Ignatius and the Princess II (next_permutation)

题目

2019-07-12 15:24:55 107

原创 HDU 2094 产生冠军(set)

题目代码#include <bits/stdc++.h>using namespace std;int main(){ int n; set <string> s1,s2; string str1,str2; while (cin>>n&&n) { s1.clear(); ...

2019-07-12 14:24:47 181

原创 CPP 两点间的距离 (函数模板)

题目代码#include <iostream>#include <cmath>using namespace std;template <class T>class d{private: T x1; T y1; T x2; T y2;public: d(int i_x1,int i_y1, int i...

2019-05-22 13:25:48 571

转载 Big Integer 大数类模板

不错的模板https://www.xuebuyuan.com/3237931.html

2019-05-09 14:09:57 116

原创 UVA 357 Let Me Count The Ways(完全背包)

题目概括:一共有1、5、10、25、50五种面值的钱币,输入多组金额,分别求出用这五种钱币一共有多少种组合方式。题目解析:该题目涉及了完全背包的算法。有两个博客对于这个算法有详细的解释,在这里引用一下:https://blog.csdn.net/qq_38984851/article/details/81133840https://www.cnblogs.com/fengziwei/...

2019-04-17 23:33:58 135

原创 HDU 1711 Number Sequence(KMP算法详解)

题目:代码:#include <iostream>#include <stdio.h>#include <cstring>using namespace std;const int maxn = 1000005;const int maxm = 10005; int a[maxn],b[maxm];int main (){ i...

2019-04-14 18:36:06 113

原创 HDU 1243 反恐训练营 (LCS变形)

题目:代码:#include<iostream>#include<cstdio>#include<cstring>using namespace std;int dp[2500][2500];char s[30],m[2500],k[2500];int b[30];int main(){ int n; while(~scanf...

2019-04-14 18:30:43 155

空空如也

空空如也

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

TA关注的人

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