Largest Point Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1485 Accepted Submission(s): 588 Problem Description Given the sequence A with n integers t1,t2,⋯,tn. Given the integral coeffici…
2019 杭电多校 5 1004 题目链接:HDU 6627 比赛链接:2019 Multi-University Training Contest 5 Problem Description You are given two integers \(N,C\) and two integer sequences \(a\) and \(b\) of length \(N\). The sequences are indexed from \(1\) to \(N\). Please solve…
2019 杭电多校 8 1009 题目链接:HDU 6665 比赛链接:2019 Multi-University Training Contest 8 Problem Description Calabash is the servant of a landlord. The landlord owns a piece of land, which can be regarded as an infinite 2D plane. One day the landlord set up two…
题意:给定一个n和m,问你x^j + y^j = z^j 的数量有多少个,其中0 <= x <= y <= z <= m, j = 2, 3, 4, ... n. 析:是一个数学题加分类讨论.首先对 x进行分类讨论. 当 0 = x 时,只要 y = z,就行,那么就有(m+1) * (n-1) 个,因为 y 可能从0取到m ,j 可以从2取到 n. 当 0 != x 时,那么只要一个勾股定理能构成,只要幂大于2,就一下没解,所以我们把第一种中拿出j = 2时,的特殊情况,特殊考…
Thinking about it: 对于式子 a * ti * ti + b * tj,可以看作时有两部分构成 a * ti * ti 和 b * tj,如果整个式子要最大,则要求这两部分都要尽量大.那么再读入数据 t 时,那么就可以构造两个数组,一个存储a * ti * ti ,另一个存储 b * tj.在选取时就产生了两种方案: 1. 先选取 a * ti * ti 最大的,接着再 i != j 的基础上, 选择 b * tj 最大的. 2. 先选取 b * tj 最大的,接着再 i !=…
B. Masha and geometric depression 题意 在黑板上写数列,首项是b,公比是q,超过l时就停止不写.给定m个数,遇到后跳过不写.问一共写多少个数,如果无穷个输出inf. 题解 分类讨论要注意b大于l,则一个也不会写.(仔细读题!! 暴力的话,可以用map或者set,然后遇到重复的就是inf. 代码 const int N = 2000001; ll b,q,u,m; ll a[N]; int main(){ while(~scanf("%lld%lld%lld%ll…
Labyrinth Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1368 Accepted Submission(s): 574 Problem Description 度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,…
题链;http://codeforces.com/problemset/problem/251/B B. Playing with Permutations time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little Petya likes permutations a lot. Recently his mom has p…