自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

长路漫漫 唯剑作伴

初音ミク是信仰

  • 博客(222)
  • 收藏
  • 关注

原创 Activity 与 ActivityManagerService 的启动过程

参考资料:Android 8.0 ActivityManagerService 启动流程Android四大组件之Activity–管理方式(这个博主写的其他文章都很不错,推荐也都去看一看)基于Android 9.0的Activity启动流程源码分析SDK 版本:29.0.2从 Android 的启动流程开始讲起。Android 设备启动要经历三个阶段,Boot Loader、Linux...

2019-12-06 22:18:12 1561

原创 Fragment 与 Activity 的联系和 Fragment 的管理

参考:https://www.jianshu.com/p/180d2cc0feb5版本:androidx 1.1.0大部分都使用 AppCompatActivity,所以就以它的父类 FragmentActivity①^{①}① 来进行分析。FragmentActivity 通过使用 FragmentController 来对 Framgent 进行管理,不过 FragmentControl...

2019-12-04 17:11:18 749

原创 Kotlin 属性的声明修饰符在 Java 中的作用

Kotlin 版本:Kotlin 1.3[@JvmField] [public|protected|private] [open] <var|val> <propertyName>中括号的为可选修饰符如果要实现静态属性可采用companion object{ [@JvmField] [public|protected|private] [open] <va...

2019-11-03 22:56:48 404

原创 Android: Activity间的数据传递

示例:(来源于 Android 编程权威指南第3版)背景:两个活动,一个是 Quiz 活动,另一个是 Cheat 活动。题目答案从 Quiz 活动传递给 Cheat 活动,再把用户是否作弊的信息传递给 Quiz 活动。1.首先我们位于 Quiz 活动,想点击作弊按钮,启动 Cheat 活动。但是在此之前,先创建一个 Intent,Intent 用于活动的交互(四大组件都可以用它...

2019-03-04 23:51:06 388

原创 Android Studio关于\app\src\main\res\values\colors.xml:1:1 Error:前言有不允许的内容。

如图所示:我感觉是配置的问题,我把C盘user目录下的.android studio 3.2删了,重新启动android studio让它重新配置,问题就解决了。

2019-02-26 13:40:29 6717 9

原创 Codeforces Round 1076 (Educational Codeforces Round 54 Rated for Div. 2) F. Summer Practice Report

F. Summer Practice Reporttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVova has taken his summer practice this year and now he...

2018-11-19 22:18:53 278

原创 Gym - 101972B B. Updating the Tree

B. Updating the Treetime limit per test1.5 smemory limit per test256 MBinputstandard inputoutputstandard outputA rooted tree is a tree with a countable number of nodes, in which a pa...

2018-11-13 12:57:21 546

原创 退役了退役了

大三拿了个银,本想大四拿个金,但现实就是残酷,徐州拿铜收尾。update:2018-11-12菜是原罪,并且队友之间的配合也不是很好。这篇文章算是我对自己ACM生涯的总结吧。(人生相关的文章我写得少这算是第一篇吧)我是来自山东理工大学机械工程学院测控技术与仪器一名15级菜鸡(现在自我介绍好像有点晚了)我一个和ACM不对口的专业为什么会选择它呢?是因为我也是比较喜欢计算机这方面的,但...

2018-10-29 17:32:07 306 3

原创 UVA 13277(UVALive 8083) XOR Path

题目链接:https://cn.vjudge.net/problem/UVA-13277,https://cn.vjudge.net/problem/UVALive-8083Time limit 1000 ms(UVA),3000 ms(UVALive)You are given an unrooted weighted tree. The weights on the edgesa...

2018-09-06 16:18:10 289

原创 (模板题)loj #127. 最大流 加强版(hlpp)

题目链接:https://loj.ac/problem/127最大流hlpp模板(原作者是xehoth,我就改了改拿来用用)请根据题目要求做修改。Note:可将vector改为链式前向星,代码我就不贴出来了,如有需要请私信我。update(2018.9.29):算是对这个板子的总结。在检验板子的时候发现这个东西跑网络流时间下限较高,但上限小,适合跑边数多的图,毕竟O(),时...

2018-08-24 16:14:07 1329

原创 Codeforces Round 1023 (#504 rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) D. Array Restoration

D. Array Restorationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputInitially there was an array aa consisting of n integers. Pos...

2018-08-18 11:33:21 191

原创 O(n)素数、欧拉、莫比乌斯筛

void init(){ int i,i1; memset(vis,0,sizeof(vis)); memset(mu,0,sizeof(mu)); phi[1]=1; mu[1]=1; top=0; for(i=2;1000000&gt;=i;i++) { if(vis[i]==0) { ...

2018-08-13 21:34:22 321

原创 Gym - 101755F F. Tree Restoration

F. Tree Restorationtime limit per test:2.0 smemory limit per test:256 MBinput:standard inputoutput:standard outputThere is a tree of n vertices. For each vertex a list of all its successors ...

2018-08-06 21:41:40 302

原创 sdut 4220 Games(“浪潮杯”山东省第九届ACM大学生程序设计竞赛 G)

GamesTime Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProblem DescriptionAlice and Bob are playing a stone game. There are nn piles of stones. In each turn, a player can remove some ...

2018-05-31 21:49:45 223

原创 ZOJ 4032 Magic Points

Magic PointsTime Limit: 1 Second      Memory Limit: 65536 KB      Special JudgeGiven an integer , we say a point  on a 2D plane is a magic point, if and only if both  and  are integers, and exactly on...

2018-05-04 21:51:39 404

原创 PAT 1095. Cars on Campus (30)

Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you a...

2018-03-26 11:45:11 151

原创 Gym - 100935G G. Board Game

Problem G. Board GameInput: standard inputOutput: standard outputBalloon Color: OrangeFeras bought to his nephew Saleem a new game to help him learning calculating. The game consists ofa board...

2018-02-27 00:15:33 679

原创 Gym - 101630C C. Connections

题目链接:https://odzkskevi.qnssl.com/c0c059d5732d43b0fe84c99caa5fb80f?v=1512491182Problem C. ConnectionsTime limit: 3 secondsHard times are coming to Byteland. Quantum computing is becoming mainstre

2017-12-09 16:30:17 884

原创 UVA 401 Palindromes

题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342题意:给你个字符串叫你判断它是什么样子的字符串(回文镜像、镜像、回文、普通)。思路:把题目中的字母打表后直接做。这题迷之RE,迷之WA。好吧,RE是因为会有其他字符,但

2017-11-11 20:36:26 215

原创 Codeforces 877(#442 Div.2) C. Slava and tanks

 C. Slava and tankstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSlava plays his favorite game "Peace Lightning". Now he is ...

2017-10-24 18:47:21 905

原创 Codeforces 877(#442 Div.2) B. Nikita and string

 B. Nikita and stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Nikita found the string containing letters "a" an...

2017-10-24 18:42:38 454

原创 HDU 6201 transaction transaction transaction

transaction transaction transactionTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 284    Accepted Submission(s): 125Problem D

2017-09-10 21:51:01 979 2

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 E.Half-consecutive Numbers

题意:已知数列t_i=i*(i+1)/2,给出一个n。求一个i,i要大于等于n且保证t_i的值为平方数。思路:打表,我们首先知道有些连续的数答案是一样的,比如:n=1,ans=1n=2,ans=8n=3,ans=8......那么我们可以直接去找出这些ans,打表后可知这些数一共有22个。打表技巧:t_i为平方数的条件:当i或(i+1)中,那个奇数它本身就是

2017-09-09 18:43:59 693 1

原创 HDU 6181 Two Paths

Two PathsTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 153428/153428 K (Java/Others)Total Submission(s): 110    Accepted Submission(s): 70Problem DescriptionYou are given a undir

2017-08-24 21:27:09 348

原创 HDU 6165 FFF at Valentine

FFF at ValentineTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 159    Accepted Submission(s): 72Problem DescriptionAt Val

2017-08-22 19:43:01 1075

原创 HDU 6168 Numbers

NumbersTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 92    Accepted Submission(s): 44Problem Descriptionzk has n numbers a1,a2

2017-08-22 19:15:44 400

原创 HDU 6060 RXD and dividing

RXD and dividingTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 829    Accepted Submission(s): 347 Problem DescriptionRXD has

2017-08-02 13:14:59 207

原创 HDU 6063 RXD and math

RXD and mathTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 465    Accepted Submission(s): 242Problem DescriptionRXD is a good

2017-08-02 10:16:36 272

原创 Codeforces 834(#426 Div.2) C.The Meaningless Game

 C. The Meaningless Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSlastyona and her loyal dog Pushok are playing a mean...

2017-07-31 09:01:21 963

原创 HDU 6053 TrickGCD

TrickGCDTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2073    Accepted Submission(s): 804Problem DescriptionYou are given

2017-07-29 22:12:58 325

原创 FZU 2254 英语考试

Problem 2254 英语考试 Accept: 88    Submit: 218Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description在过三个礼拜,YellowStar有一场专业英语考试,因此它必须着手开始复习。这天,YellowStar准备了n个需要背的单词,每

2017-07-25 10:24:52 399

原创 CSU 1508 地图的四着色

1508: 地图的四着色Submit Page    Summary    Time Limit: 20 Sec     Memory Limit: 128 Mb     Submitted: 230     Solved: 105    Description有一个R行C列的网格地图,每个国家是一个四连通区域。你的任务是用红,绿,蓝,黄四种颜色

2017-06-25 09:42:22 429

原创 CodeM美团点评编程大赛A轮 C.倒水

[编程题] 倒水时间限制:1秒空间限制:32768K有一个大水缸,里面水的温度为T单位,体积为C升。另有n杯水(假设每个杯子的容量是无限的),每杯水的温度为t[i]单位,体积为c[i]升。现在要把大水缸的水倒入n杯水中,使得n杯水的温度相同,请问这可能吗?并求出可行的最高温度,保留4位小数。注意:一杯温度为t1单位、体积为c1升的水与另一杯温度为t2单位

2017-06-19 21:26:16 1059

原创 NEUQ 1768 一道简单的递推题

问题 F: 一道简单的递推题时间限制: 1 Sec  内存限制: 128 MB提交: 609  解决: 65[提交][状态][讨论版]题目描述存在如下递推式:F(n+1)=A1*F(n)+A2*F(n-1)+...+An*F(1)求第K项的值对1000000007取模的结果输入单组测试数据第一行输入两个整数 n , k (

2017-06-12 10:57:46 477

原创 2017 计蒜客复赛 D.百度地图导航

AC率:17.24% 时限:1000ms 内存限制:131072K百度地图上有 n 个城市,城市编号依次为 1 到 n。地图中有若干个城市群,编号依次为 1 到 m。每个城市群包含一个或多个城市;每个城市可能属于多个城市群,也可能不属于任何城市群。地图中有两类道路。第一类道路是 城市之间的快速路,两个城市 u,v 之间增加一条距离为 c 的边;第二类道路是 城市群之间的高速路,连接

2017-06-10 20:49:04 369

原创 HDU 3001 Travelling

TravellingTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7394    Accepted Submission(s): 2405Problem DescriptionAfter coding so

2017-06-06 17:16:38 356

原创 HZAU 1199 Little Red Riding Hood

1199: Little Red Riding HoodTime Limit: 1 Sec  Memory Limit: 1280 MBSubmit: 892  Solved: 144[Submit][Status][Web Board]Description    Once upon a time, there was a little girl. H

2017-04-25 09:57:01 631

原创 HZAU 1209 Deadline

1209: DeadlineTime Limit: 2 Sec  Memory Limit: 1280 MBSubmit: 1046  Solved: 102[Submit][Status][Web Board]Description     There are N bugs to be repaired and some engineers whose abili

2017-04-24 20:23:08 427

原创 ZOJ 3961 Let's Chat

Let's ChatTime Limit: 1 Second      Memory Limit: 65536 KBACM (ACMers' Chatting Messenger) is a famous instant messaging software developed by Marjar Technology Company. To attract more user

2017-04-23 21:50:06 1301

原创 HZAU 1205 Sequence Number

题目链接:http://acm.hzau.edu.cn/5th.pdfG. Sequence NumberIn Linear algebra, we have learned the definition of inversion number:Assuming A is a ordered set with n numbers ( n > 1 ) which are differen

2017-04-23 21:14:44 364

空空如也

空空如也

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

TA关注的人

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