- 博客(6)
- 收藏
- 关注
原创 C - Division by Two and Permutation
You are given an arrayaaconsisting ofnnpositive integers. You can perform operations on it.In one operation you can replace any element of the arraya_iaiwith\lfloor \frac{a_i}{2} \rfloor⌊2ai⌋, that is, by an integer part of dividinga_iaiby2...
2022-04-30 16:35:33 250
原创 H - Vlad and Candies
Not so long ago, Vlad had a birthday, for which he was presented with a package of candies. There werenntypes of candies, there area_iaicandies of the typeii(1 \le i \le n1≤i≤n).Vlad decided to eat exactly one candy every time, choosing any of the...
2022-04-30 16:24:27 289
原创 D - Game
You are playing a very popular computer game. The next level consists ofnnconsecutive locations, numbered from11tonn, each of them containing either land or water. It is known that the first and last locations contain land, and for completing the leve...
2022-04-30 16:20:39 293
原创 hdu 2069
此题限制了硬币的总数不超过100,先看不完全解决方案,不考虑硬币个数的限制。找到dp[i]和dp[i-1]的关系。#include<bits/stdc++.h>using namespace std;const int MONEY=251;int type[5]={1,5,10,35,50};int dp[MONEY]={0};int main(){ int s; dp[0]=1; for(int i=0;i<5;i++) for(int j=type[
2022-04-29 11:14:19 100
原创 团体程序设计天梯赛-L2-042 老板的作息表
#include<bits/stdc++.h>using namespace std;typedef struct{ int x,y,z,h,m,s;} Q;Q a[101010];bool cmp(Q t1,Q t2){ if(t1.x!=t2.x)return t1.x<t2.x; else if(t1.y!=t2.y ) return t1.y<t2.y; else return t1.z<t2.z;}int main()...
2022-04-28 13:27:07 847
原创 团体程序设计天梯赛 L1-088 静静的推荐
#include<bits/stdc++.h>using namespace std;int bb[1010];typedef struct{ int x,y;} Q;Q q[101010];bool cmp(Q a,Q b){ if(a.x!=b.x) return a.x<b.x; return a.y<b.y;}int book[101010];int main(){ int n,k,s,i=0; ...
2022-04-27 18:49:38 666
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人