ACM - 推公式
LP_Cong
Python, Qt C++ Developer ACMer https://github.com/Linzecong
展开
-
HDU - 6216 A Cubic number and A Cubic Number (2017 ACM-ICPC 亚洲区 (青岛赛区) 网络赛 1011)
2017 ACM/ICPC Asia Regional Qingdao Online 1011A Cubic number and A Cubic NumberProblem DescriptionA cubic number is the result of using a whole number in a multiplication three time原创 2017-09-17 20:25:34 · 477 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(西安赛区)网络赛 F. Trig Function
f(cos(x))=cos(n∗x) holds for all xxx.Given two integers nnn and mmm, you need to calculate the coefficient of xmx^mxm in f(x)f(x)f(x), modulo 998244353998244353998244353.Input Format原创 2017-09-16 22:27:59 · 382 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B. Coin
Bob has a not even coin, every time he tosses the coin, the probability that the coin's front face up isqp(qp≤12)\frac{q}{p}(\frac{q}{p} \le \frac{1}{2})pq(pq≤21).The question is, w原创 2017-09-16 22:14:40 · 480 阅读 · 0 评论 -
Gym - 101498D Counting Paths (推公式)
Counting Pathstime limit per test1.0 smemory limit per test256 MBinputstandard inputoutputstandard outputA binary tree is a tree data structure in which each node has at most two children, which are r...原创 2018-03-23 10:55:39 · 418 阅读 · 0 评论 -
1/x+1/y=1/n 正整数解的个数(约数定理)
对于一个大于1正整数n可以分解质因数:n = p1^a1*p2^a2*......pk^ak,则n的正约数的个数就是 :(a1+1)*(a2+1)*......*(ak+1)其中a1、a2、a3…ak是p1、p2、p3,…pk的指数。#include<iostream>using namespace std;typedef long long int ll;int main()...原创 2018-03-24 20:18:27 · 6787 阅读 · 0 评论 -
2018年上海金马五校程序设计竞赛 Problem A : King Is a Dull Boy
Problem A : King Is a Dull BoyFrom: DHUOJ, 2018060901Submit (Out of Contest)Time Limit: 3 sDescriptionKing is a dull boy and not good at math. One day he met a simple problem but couldn’t find the ans...原创 2018-06-09 17:09:12 · 436 阅读 · 0 评论 -
2018年上海金马五校程序设计竞赛 Problem E : Grid
Problem E : GridFrom: DHUOJ, 2018060905Submit (Out of Contest)Time Limit: 1 sDescriptionHere is an n×m grid, which is made up of 1×1 lattices. You can find many rectangles with different sizes in the ...原创 2018-06-09 17:12:44 · 239 阅读 · 0 评论