If7's Home
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于
  • 友链

Paths in a Complete Binary Tree

题目描述$T$ is a complete binary tree consisting of $n$ vertices. It means that exactly one vertex is a root, and each vertex is either a leaf (and doesn’t have children) or an inner node (and has exactly
2017-06-15
OI > Common Skill
#Bitmask

Brackets

题目描述We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) and [s] are regular b
2017-06-14
OI > Common Skill
#Dynamic Programming

The Almost Lucky Numbers

题目描述A lucky number is a number whose decimal representation contains only the digits $4$ and $7$. An almost lucky number is a number that is divisible by a lucky number. For example, $14, 36$ and $747
2017-06-12
OI > Number Theory
#GCD-LCM #Inclusion-Exclusion Principle

Jackpot

题意概述给定$n$个数$P_i$,求$\lim_{k \to \infty} {S_k \over 2k+1}$,其中$S_k$表示区间$[-k, k]$中能被至少一个$P_i$整除的数的个数。 数据范围:$1 \le n \le 16, \ 1 \le P_i \le 10^9$。 算法分析观察这个公式,可以发现这就是在所有整数中等概率选取一个数$X$,$X$能被至少一个$P_i$整除的概率。考
2017-06-08
OI > Number Theory
#GCD-LCM #Inclusion-Exclusion Principle

Expensive Drink

题意概述已知$0 \le c_1 \le c_2 \le c_3, \ 0 \le c_4, \ L \le a_4c_4 \le R$。$c_1, c_2, c_3, c_4$均为未知的常量。 给出$L, R$和$n$组$a_1, a_2, a_3, p$,对于任意一组均满足$p=a_1c_1+a_2c_2+a_3c_3+a_4c_4$。现在给出一组$a_1, a_2, a_3$,求$
2017-06-08
OI > Number Theory
#Linear Programming

Coupons

题意概述一共有$n$种不同的优惠券,每次得到每种优惠券的概率相同。问期望多少次可以得到所有种类的优惠券,以带分数形式输出。 数据范围:$1 \le n \le 33$。 算法分析假设当前已经有$k$种优惠券,那么获得新优惠券的概率是${n-k \over n}$,所以需要步数的期望是${n \over n-k}$。求和得到总步数的期望是${n \over n}+{n \over n-1}+{n \
2017-06-07
OI > Number Theory
#Probability

Tower

题意概述有一个数列,$a_1=1, \ a_n=2a_2a_{n-1}-a_{n-2}$。给定$a_2$,求这个数列前$N$项的平方和模$M$。有$T$组数据。 数据范围:$1 \le T \le 10^5, \ 1 \le a_2, M \le 10^9, \ 2 \le N \le 10^9$。 算法分析设$p=2a_2$,$S_n$表示前$n$项的平方和(不包括
2017-06-06
OI > Common Skill
#Exponentiation by Squaring

My .vimrc

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210
2017-06-02
Coding > Operating System
#Linux

Happy Children's Day!

Keep a good heart.
2017-06-01
Life > Essay

Hello World!

Welcome to If7’s Home!
2017-05-31
Life > Essay
1…151617

搜索

Copyright © 2017-2024 RegMs If. Hexo Fluid