随笔分类 -  构造题

Seven-segment Display 贪心选择,快速判断能否有解
摘要:https://csacademy.com/contest/round-39/task/seven-segment-display/ 可以知道,只有1是无解 而且肯定是选出来的位数约小越好。 位数 = (k + 6) / 7,因为总是可以通过买7来最大化缩小位数 然后枚举每一位选什么,选的时候,需要 阅读全文

posted @ 2017-07-27 02:06 stupid_one 阅读(389) 评论(0) 推荐(0) 编辑

D. Mike and distribution 首先学习了一个玄学的东西
摘要:http://codeforces.com/contest/798/problem/D D. Mike and distribution time limit per test 2 seconds memory limit per test 256 megabytes input standard 阅读全文

posted @ 2017-04-22 23:45 stupid_one 阅读(770) 评论(0) 推荐(0) 编辑

Lena Sort 构造题,很多细节的模拟
摘要:https://www.hackerrank.com/contests/101hack46/challenges/lena-sort 把题目转换成一颗二叉树,也就是当前的节点是cur,然后大的,放右边,小的,放左边。 然后所有节点的深度总和,就是答案c。现在就是要你构造一颗这样的树。 最大的树就是左 阅读全文

posted @ 2017-02-16 14:47 stupid_one 阅读(314) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示