自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Android开发的UI设计——Material Design

Material Design 是用于指导用户在各种平台和设备上进行视觉、动作和互动设计的全面指南。如需在您的 Android 应用中使用 Material Design,请遵循 Material Design 规范中定义的准则,并使用 Material Design 支持库中提供的新组件和样式。作为Google旗下的一员——安卓,则是将其一些最具代表性一些控件和效果封装在Material库,这就让我们开发者可以在不了解Material Design的情况下,也很容易将自己的应用Material化,当然现在

2022-12-03 13:55:10 1263

原创 2021牛客暑期多校训练营1 G. Game of Swapping Numbers

题目大意: 给定序列 A,B,需要交换恰好 k 次 A 中两个不同的数,使得 A,B 每个位置的绝对差值和最大。思路:首先交换上下交换a,b相同位置的数,使a[i]<b[i]。因为求绝对值所以上下交换不影响。计算出当前差值。然后对a,b,两个数组分别排序。再将a中最小的与b最大的交换位置并计算。代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=5e5+5;int a[N

2021-07-18 11:10:45 322

原创 2021牛客暑期多校训练营1 A. Alice and Bob

题目:Alice and Bob like playing games. There are two piles of stones with numbers {n}n and {m}m. Alice and Bob take turns to operate, each operation can take away {k}(k>0)k(k>0) stones from one pile and take away s \times k(s \geq 0)s×k(s≥0) stones fro

2021-07-17 22:40:44 308

原创 2021牛客暑期多校训练营1 F.Find 3-friendly Integers

题目:大意:计算L到R范围内为3-friendly的整数,其中只要满足有连续字符串为3的倍数则为3-friendly数。把每个数字进行转化。01234567890120120120如果数字存在0,那么即是3-friendly数,当这个数数位超过或等于三位时,无论怎么组合必然会出现会出现3的倍数。所以100及以上的数都为3-friendly数。只要对个位数以及两位数进行特判即可。代码:#include<iostream>

2021-07-17 20:33:25 223

原创 2021牛客暑期多校训练营1 B.Ball Dropping

A standard sphere ball is falling in the air, and the center of the sphere is exactly on the centerline of an empty isosceles trapezoidal. The trapezoid is hanging horizontally under the sphere.Please determine whether the ball will get stuck in the trap

2021-07-17 19:52:42 149

原创 2021牛客暑期多校训练营1 D.Determine the Photo Position

You have taken the graduation picture of graduates. The picture could be regarded as a matrix A of n \times nn×n, each element in A is 0 or 1, representing a blank background or a student, respectively.However, teachers are too busy to take photos with st

2021-07-17 19:42:18 129

原创 牛客小白月赛32 C.消灭整数

题目描述:给出一个正整数H,从1开始减,第一次必须减1,每次减的数字都必须和上一次相同或者是上一次的两倍,请问最少需要几次能把H恰好减到0。思路:因为每次减的数字都必须和上一次相同或者是上一次的两倍,所以2^ 0+2^ 1+2^ 2+2^ 3+…+2^ n必定都存在,且n为H>= 2^ 0+2^ 1+2^ 2+2^ 3+…+2^ n中的那个最大的n;H减去2^ 0+2^ 1+2^ 2+2^ 3+…+2^ n后剩下的数就可以和1~2^n中2的平方数组合,再尽量选大的。代码:#include&l

2021-04-01 20:40:33 131

空空如也

空空如也

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

TA关注的人

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