K. Malek and Summer Semester time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output Malek registered n courses for the summer semester. Malek has a success rate m, which means he has to succeed at least in …
I. Move Between Numbers time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output You are given n magical numbers a1, a2, ..., an, such that the length of each of these numbers is 20 digits. You can move from…
E. The Architect Omar time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output Architect Omar is responsible for furnishing the new apartments after completion of its construction. Omar has a set of living ro…
[题目链接] A - On The Way to Lucky Plaza 首先,$n>m$或$k>m$或$k>n$就无解. 设$p = \frac{A}{B}$,$ans = C_{n - 1}^{k - 1}{\left( {\frac{A}{B}} \right)^{k}}{\left( {\frac{B-A}{B}} \right)^{n - k}} = \frac{{\left( {n - 1} \right)! \times {A^k} \times {{\left( {B -…
台州学院ICPC赛前训练5 人生第一次ak,而且ak得还蛮快的,感谢队友带我飞 A 直接用claris的模板啊,他模板确实比较强大,其实就是因为更新的很快 #include<bits/stdc++.h> using namespace std; int fun(int x,int y) { return x&y; } ; int n,a[N],l[N],v[N]; int main() { ios::sync_with_stdio(),cin.tie(),cout.tie(); int…
A.On The Way to Lucky Plaza  (数论)题意:m个店 每个店可以买一个小球的概率为p       求恰好在第m个店买到k个小球的概率 题解:求在前m-1个店买k-1个球再*p就好了 最开始没太懂输出什么意思       其实就是p*q的逆元的意思 因为概率是三位小数于是对他*1000*1000的逆元处理 还要加个eps 因为0.005浮点数由于不确定性可能存的0.0050001或者0.00499999 #include <bits/stdc++.h> using na…
B. So You Think You Can Count? 设dp[i]表示以i为结尾的方案数,每个位置最多往前扫10位 #include<bits/stdc++.h> using namespace std; typedef long long ll; ; ; ll dp[maxn];//dp[i]表示以i结尾的方案数. ]; char s[maxn]; int main() { int n; cin >> n; cin >> s + ; dp[] = ; ;i &…
B. Linear Algebra Test time limit per test 3.0 s memory limit per test 256 MB input standard input output standard output Dr. Wail is preparing for today's test in linear algebra course. The test's subject is Matrices Multiplication. Dr. Wail has n m…
D. Dice Game time limit per test 1.0 s memory limit per test 256 MB input standard input output standard output A dice is a small cube, with each side having a different number of spots on it, ranging from 1 to 6. Each side in the dice has 4 adjacent…
H. Eyad and Math time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output Eyad was given a simple math problem, but since he is very bad at math he asked you to help him. Given 4 numbers, a, b, c, and d. Your…