- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 哈理工I暴力
#include #include #include #include using namespace std; int vis[11]; void con(int a) { while(a) { vis[a%10] = 1; a/=10; } } bool judge(int x,int a,int b) { if(x % a == 0||
2018-01-21 17:49:23 204
原创 哈理工H递推
#include #include #include #include using namespace std; typedef long long ll; const int maxn = 100; ll ans[maxn]; void init() { ans[1] = 1; ans[2] = 2; for(int i=3;i80;i++) ans[i] = ans[i-1]+
2018-01-21 17:48:49 131
原创 哈理工A大吉大利-吃鸡
#include #include #include #include using namespace std; const int maxn = 1050; typedef struct node{ int p,k; int kk[maxn]; }Gay; Gay gay[maxn]; double qq[maxn]; int main() { int n,m;
2018-01-21 17:48:01 236
原创 Codeforces-686C Robbers' watch
读题读题!!! 有个手表,由小时和分钟组成,而且小时和分钟是基于7进制储存的。 现在一天有n个小时,每个小时m分钟。 于是将这一天所有时间的显示在手表上(时:分) 注意都是7进制表示 如9时8分为(12:01) 于是一天可以有n*m中不同的时刻。 问你这n*m个时刻显示在手表上(每一位都不相同的)个数有多少个 eg 9时8分(12:01) 1重复
2018-01-21 13:37:36 329
原创 Codeforces-686B Little Robber Girl's Zoo
冒泡排序原理题 #include #include #include #include using namespace std; const int maxn = 105; int a[maxn]; int main() { int n; while(~scanf("%d",&n)) { for(int i=1;i<=n;i++) {
2018-01-21 13:36:02 228
原创 Codeforces-686A Free Ice Cream
水题 #include #include #include #include using namespace std; typedef long long ll; int main() { int n; ll x,it; char op; while(~scanf("%d%I64d",&n,&x)) { int cnt = 0;
2018-01-21 13:34:55 262
原创 Codeforces-681D Gifts by the List
思维DFS 题意: 给出一颗树。树的每一个结点都想要给其祖先送礼。(祖先=其自身+其父结点到根结点) 给出每个结点想要送礼的祖先结点。 但是送礼需要基于一个独立表(只能送这张表里的)。每个结点只能送这张表上第一个是他的祖先的结点。 于是 你需要构造这么一张表。满足每个结点送给的祖先结点的都是其想要送的结点。 题解: 如果是根结点,其只能送给自己。 如果是中间结点。他要么送给自己要么
2018-01-21 13:33:32 212
原创 Codeforces-681C Heap Operations
优先队列的模拟 支持3种操作 insert x :将x插入到最小堆中。 getMin x :获取最小堆的堆顶,要求最小值为x removeMin:将最小堆的堆顶弹出。 题目给出了一些操作,不一定合法,往里再添加一些操作使得所有的操作都合法, 求添加操作最少的情况并按序输出全部操作(新添加的和已存在的) 题解: 优先队列模拟最小堆 insert x向队列里加入x removeMin时将堆顶to
2018-01-20 20:33:55 172
原创 Codeforce-681B Economy Game
#include #include #include using namespace std; typedef long long ll; const int INF = 1e9; int main() { ll n; while(~scanf("%lld",&n)) { bool ans = false; for(int a=0;;a++)
2018-01-20 20:31:28 136
原创 Codeforce-618A A Good Contest
#include #include #include using namespace std; int main() { string name; int last,now; bool flag = false; int n; scanf("%d",&n); for(int i=1;i<=n;i++) { cin>>name>
2018-01-20 20:28:47 200
现代模式识别第一版
2018-11-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人