自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 寒假训练贪心专题

A - 外币兑换蒜头君刚从美国回来,发现手上还有一些未用完的美金,于是想去银行兑换成人民币。可是听说最近人民币将会升值,并从金融机构得到了接下来十二个月可能的美元对人民币汇率,现在,蒜头君想要在接下来一年中把美金都兑换成人民币,请问最多能得到多少人民币?输入格式输入的第一行是一个实数 N(1.00 \le N \le 100.00)N(1.00≤N≤100.00),表示蒜头君现有的美金数量。接下来一行,包含 1212 个实数 a_ia i,表示接下来十二个月的美元对人民币汇率。输出格式输出一个小

2022-02-13 19:14:56 591

原创 寒假训练递推专题

A - 上台阶2小瓜想走上一个一共有n级的台阶,由于小瓜的腿长比较特殊,他一次只能向上走1级或者3级或者5级台阶。小瓜想知道他有多少种方法走上这n级台阶,你能帮帮他吗?这道题就是简单的动规,明显可以算出 dp[n]=dp[n-1]+dp[n-3]+dp[n-5].前五个需要手算下。#include <bits/stdc++.h>#define ll long longusing namespace std;const int maxn=1e5+100;const int mod=

2022-02-09 18:36:55 683

原创 寒假训练数论专题

A - A^B Mod C给出3个正整数A B C,求A^B Mod C。A,B,C范围都是0-1e9,所以要用快速幂,这题就是快速幂板子题。#include <bits/stdc++.h>#define ll long longusing namespace std;const int maxn=1e5+100;ll pw(ll a,ll b,ll c){ ll ans=1; while(b) { if(b%2) ans=(ans*a)%c; a=(a*a)%c;

2022-01-18 15:52:33 414

原创 寒假训练搜索专题

题目链接:搜索A 棋盘问题题意很简单 就是k个棋子摆放在棋盘的方案,要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列。经典dfs深搜题#include <bits/stdc++.h>#define ll long longusing namespace std;const int maxn=1e5+100;int n,k,ans,cnt;int vis[20];char a[20][20];//搜索行数 vis数组记录列 void dfs(int cur){

2022-01-14 17:06:51 203

原创 寒假训练字符串专题

A - 雷同检测题意很简单,按照其中短的字符串长度直接遍历判断就行。#include<math.h>#include<algorithm>#include<stdio.h>#include<iostream>#include<set>#include<map>#include<string.h> using namespace std;#define ll long long const int max

2022-01-10 16:49:38 285

原创 hdu 1176 免费馅饼

免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 84206 Accepted Submission(s): 29531Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内

2020-08-17 19:12:25 105

原创 CodeForces 25D Roads not only in Berland(并查集)

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Government decided to improve relations with neighboring countries. First of all, it was decided to build new roads so that from each city of

2020-08-16 18:26:30 117

原创 codeforces 735D Taxes(哥德巴赫猜想)

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMr. Funt now lives in a country with a very specific tax laws. The total income of mr. Funt during this year is equal to n ( n ≥ 2) burles and the amo

2020-08-16 17:36:11 206

空空如也

空空如也

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

TA关注的人

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