In the growing world of technology, C programming has kind of lost its way. Today, we have a million new languages and frameworks to code. A few being JavaScript, Java, C, Python, C++, PHP, C#, Ruby, Perl, Swift, Haskell, Erlang and what not. But a l…
[题目链接] 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 -…
题目链接  gym101778 Problem A 转化成绝对值之后算一下概率.这个题有点像 2018 ZOJ Monthly March Problem D ? 不过那个题要难一些~ #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i <= (b); ++i) #define dec(i, a, b) for (int i(a); i >= (b); --i) #d…
台州学院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…
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…
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…
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…
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 …
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…