- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 黑龙江大学程序设计竞赛(重现赛)B:Help Me(数学)
链接:https://ac.nowcoder.com/acm/contest/877/B来源:牛客网有一天Miss Quan出了一个题,给出一个长度为的数组Miss Quan说给我计算下这个权值等于多少,然后随手写了一个式子,把她的小伙伴们都给惊呆了,这是什么鬼…比如N=2,Value=(a2−a1)2+(a3−a1)2+(a3−a2)2N=2,Value=(a_2-a_1)^2+(...
2019-04-25 19:03:51 286
原创 Java用sort实现对数组的降序排序
在调用Arrays.sort()对数组进行排序时,默认是升序排序的,如果想让数组降序排序,有下面两种方法:利用Collections的reverseOrderimport java.util.*;public class Main { public static void main(String[] args) {// 注意这里是Integer,不是int ...
2019-04-23 20:28:09 13174 1
原创 ZOJ 3785:What day is that day?(数论)
What day is that day?Time Limit: 2 Seconds Memory Limit: 65536 KBIt’s Saturday today, what day is it after 11+22+33+...+NN1^1 + 2^2 + 3^3 + ... + N^N11+22+33+...+NN days?InputThere are mult...
2019-04-21 17:53:59 240
原创 ZOJ 3778:Talented Chef(贪心?思维)
Talented ChefTime Limit: 2 Seconds Memory Limit: 65536 KBAs we all know, Coach Gao is a talented chef, because he is able to cook M dishes in the same time. Tonight he is going to have a hear...
2019-04-21 17:30:19 218
原创 ZOJ 3960:What Kind of Friends Are You?
What Kind of Friends Are You?Time Limit: 1 Second Memory Limit: 65536 KBJapari Park is a large zoo home to extant species, endangered species, extinct species, cryptids and some legendary cre...
2019-04-12 22:35:22 326
原创 ZOJ 3870:Team Formation(位运算&思维)
Team FormationTime Limit: 2 Seconds Memory Limit: 131072 KBFor an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his u...
2019-04-09 20:39:47 188
原创 ZOJ 3872: Beauty of Array(思维)
Beauty of ArrayTime Limit: 2 Seconds Memory Limit: 65536 KBEdward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now...
2019-04-09 19:05:31 127
原创 Codeforces 189A:Cut Ribbon(完全背包,DP)
time limit per test : 1 secondmemory limit per test : 256 megabytesinput : standard inputoutput : standard outputPolycarpus has a ribbon, its length is nnn. He wants to cut the ribbon in a way t...
2019-04-01 20:12:59 332
hexo的live2d看板娘
2019-02-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人