自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 水仙花

新手老大难 水仙花为新生准备的题解:#include <stdio.h>int main (void){ int n, m; int v[1100]; while(~scanf("%d %d", &n, &m)) { int cnt = 0;//cnt 用于存储有几个水仙花数 for(int i = n; i <= m; i ++ )//将每一个区间中的i分解为三个整数。 {

2020-09-21 21:00:39 542

转载 2020-09-02

WFU ACM 2020纳新什么是 ACM​ ACM 为国际大学生程序设计竞赛,在历史上可以上溯到1970年,逐渐演变成为目前的一年一届的多国参与的国际性比赛。每支队伍以团队的形式代表各学校参赛,每队由 3 名队员组成。比赛期间,每队使用 1 台电脑需要在 5 个小时内使用规定的编程语言解决英文题面下的 10 ~ 12 个问题。每队在正确完成一题后,组织者将在其位置上升起一只代表该题颜色的气球。加入 ACM 后我能做什么参加每年 11 月至 12 月 ICPC 中国区域赛区域赛若出线参加 Wor

2020-09-02 20:50:48 113

原创 663C(a).Cyclic Permutations(证明构造or图)

C. Cyclic Permutationshttp://codeforces.com/contest/1391/problem/C题面:A permutation of length nnn is an array consisting of nnn distinct integers from 111 to nnn in arbitrary order. For example, [2,3,1,5,4][2,3,1,5,4][2,3,1,5,4] is a permutation, but [1,

2020-08-14 15:30:47 202

原创 1393B(a).Applejack and Storages(计数,代码比较巧)

Applejack and Storageshttp://codeforces.com/contest/1393/B题面:This year in Equestria was a year of plenty, so Applejack has decided to build some new apple storages. According to the advice of the farm designers, she chose to build two storages with non-

2020-08-12 21:22:40 178 1

原创 1393A(a).Rainbow Dash, Fluttershy and Chess Coloring(规律)

Rainbow Dash, Fluttershy and Chess Coloringhttp://codeforces.com/contest/1393/A题面:One evening Rainbow Dash and Fluttershy have come up with a game. Since the ponies are friends, they have decided not to compete in the game but to pursue a common goal.T

2020-08-12 21:21:44 179

原创 1391 B(a).Fix You(规律+构造)

B. Fix Youhttp://codeforces.com/contest/1391/B题面:Consider a conveyor belt represented using a grid consisting of nnn rows and mmm columns. The cell in the iii-th row from the top and the jjj-th column from the left is labelled (i,j)(i,j)(i,j).Every cel

2020-08-12 21:20:01 282

原创 1391 A(a).Suborrays(规律)

A. Suborrayshttp://codeforces.com/contest/1391/A题面:A permutation of length nnn is an array consisting of nnn distinct integers from 111 to nnn in arbitrary order. For example, [2,3,1,5,4][2,3,1,5,4][2,3,1,5,4] is a permutation, but [1,2,2][1,2,2][1,2,2]

2020-08-12 21:19:13 191

原创 1389 C(a). Good String(规律,构造)

C. Good Stringhttp://codeforces.com/contest/1389/problem/C题面:Let’s call left cyclic shift of some string t1t2t3…tn−1tnt_1 t_2 t_3 \dots t_{n - 1} t_nt1​t2​t3​…tn−1​tn​ as string t2t3…tn−1tnt1t_2 t_3 \dots t_{n - 1} t_n t_1t2​t3​…tn−1​tn​t1​.Analogicall

2020-08-12 21:08:05 253

原创 1389 A(a). LCM Problem(结论)

A. LCM Problemhttp://codeforces.com/contest/1389/problem/A题面:Let LCM(x,y)LCM(x, y)LCM(x,y) be the minimum positive integer that is divisible by both xxx and yyy. For example, LCM(13,37)=481LCM(13, 37) = 481LCM(13,37)=481, LCM(9,6)=18LCM(9, 6) = 18LCM(9,

2020-08-12 21:01:58 203

原创 Stacks of Flapjacks(模拟+新语法(stringstream,reverse))

Stacks of Flapjacks(模拟+新语法(stringstream,reverse))懒得写了,明天在补。#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<bitset>#include<iomani...

2020-04-05 22:32:52 64

原创 Super A^B mod C(快速幂+欧拉降幂)

Super A^B mod C欧拉降幂模板题:欧拉公式:欧拉函数:ll phi(ll x)//欧拉函数{ ll i; ll num = x; for(i = 2; i*i <= x; i++) { if(x % i == 0) { num = (num/i)*(i-1); while(x % i == 0) { x = x / i;...

2020-04-05 10:49:27 128

原创 Payment Without Change(简单思维)

Payment Without Change题意:你有a个面值为n的硬币和b个价值为1的硬币。现给你一个数,你能否用这些硬币组成价值为这个数的钱。题解:简单的思维题,做的时候有一个问题就是求k和x的时候乱了,应该是求出距离s最近的那部分,求法就是s/n得到是刚好接近的那个倍数,在乘上a。同时理解一下,如果用a*n的时候,b用的是最少的,如果这个时候b不够用,那就一定不行。将s/n * a得...

2020-04-04 21:34:15 163

原创 K-th Beautiful Strin (数学,思维)(注意for(longlong i ))

K-th Beautiful String(数学,思维)(注意for(ll i; i<max; i++))题意:打印一个长n的字符串,原始字符串为n-2个a和最后两个b(设n=4,则str==aabb),然后打印这个字符串第m个字典排序的字符串。题解:最开始没看数据,直接prev_permutation()函数,然后tle,在思考,发现应该是一个规律题,然后找规律,规律找到了,考虑用...

2020-04-04 21:20:09 108

原创 GukiZ hates Boxes(二分)

GukiZ hates Boxes这个题太难了,看别人的题解也不会,种草。#include<bits/stdc++.h>using namespace std;long long a[100010];int n,m,tot;long long ans;int cheak(long long x){ long long s=0; int cnt=m; ...

2020-04-04 18:33:38 88

原创 Ilya and tic-tac-toe game (暴力,图中斜着走)

Ilya and tic-tac-toe game (暴力,图中斜着走)题意:给你一张图,然后将一个空白点填充为标记点。查询有几个相连的标记点(但只能是五子棋似的相连,纵横斜)题解:本来想用搜索的,但是写了一半发现,只能解决油田问题的变形题,解决这个题有点困难,并不能直来直去。然后搜了一下题解,本以为是可以完善我的搜索类型题的解法,结果一看全是暴力。在写暴力的时候,发现斜着走写起来很困难...

2020-04-04 11:58:11 134

原创 A Simple Problem with Integers 线段树区间修改,LAZY思想

A Simple Problem with Integers#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<bitset>#include<iomanip>#include<cassert>...

2020-03-29 22:44:27 65

原创 The Child and Sequence

The Child and Sequence //剪枝#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<bitset>#include<iomanip>#include<cassert>#...

2020-03-28 14:12:45 113

原创 题集

WFU2019级训练(九) ### B: Kuroni and Impossible Calculation#include <bits/stdc++.h>#define ll long long#define met(a,b) memset(a,0,sizeof(a))#define mod 998244353#define INF 0x3f3f3f3f#def...

2020-03-15 17:17:41 191

原创 并查集板子

并查集板子第一部分:赋值void init(){ for(int i=0; i<=MAX; i++) { father[i] = i; }}第二部分:找爹int getf(int x){ if(father[x] == x) { return x; } e...

2020-03-14 18:51:23 115

原创 scanf与gets 对于字符串、字符、数的不同的输入情况。(傻孩子的第一次笔记)

# include <stdio.h>int main (void){ char b; char str[13333]; scanf("%s", str); scanf("%c", &b); printf("%s\n", str); printf("%c\n", b); return 0;}这是因为‘\n’被当作字符输入到字符变量b中了。所以加...

2019-11-03 23:12:09 150

空空如也

空空如也

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

TA关注的人

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