Xtreme8.0 - Sum it up 水题】的更多相关文章

Sum it up 题目连接: https://www.hackerrank.com/contests/ieeextreme-challenges/challenges/sum-it-up Description Minka is very smart kid who recently started learning computer programming. His coach gave him a cyclic array A having N numbers, and he has to…
HDU5053the Sum of Cube(水题) 题目链接 题目大意:给你L到N的范围,要求你求这个范围内的全部整数的立方和. 解题思路:注意不要用int的数相乘赋值给longlong的数,会溢出. 代码: #include <cstdio> #include <cstring> const int N = 10005; typedef long long ll; ll t[N]; void init () { for (ll i = 1; i <= N - 5; i++…
Osu! is a famous music game that attracts a lot of people. In osu!, there is a performance scoring system, which evaluates your performance. Each song you have played will have a score. And the system will sort all you scores in descending order. Aft…
2679:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1679 2952:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1951 ZOJ:2679先来~ 水题大意:(题目大意:我什么时候改名了哇T T) 给你一个5位数的中间三个字母,还有一个数N让你求能被N整除的最大的五位数. 思路: 直接暴力枚举.... #include<cstdio> int…
Xtreme8.0 - Magic Square 题目连接: https://www.hackerrank.com/contests/ieeextreme-challenges/challenges/magic-square Description Johnny designed a magic square (square of numbers with the same sum for all rows, columns and diagonals i.e. both the main di…
题目链接: B. Modulo Sum time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a sequence of numbers a1, a2, ..., an, and a number m. Check if it is possible to choose a non-empty subse…
题目描述: Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are four different sums that equal…
题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=0&problem=1911 题意 m*n的矩形巧克力,要切成1*1,不能一次切两块,问多少下切完 思路 明显,若m<n,尽量优先沿着n的方向切,使得最后需要一个个切的时候长边最短,(m - 1) * n + (n - 1) 代码 感想: 虽然是水题但是错了好几次甚至超时…
#include <iostream> #include <stdio.h> #include <algorithm> #define lson rt<<1,L,mid #define rson rt<<1|1,mid+1,R /* AC 水题 题意:给出n个数,两种操作 U i x 将第i个数改成x Q x y 查询[x,y]中两个数的和的最大值,这两个数不能为同一个 即只要求该区间第一大和第二大的数,他们的和即为答案 */ using nam…
Hangover Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 99450   Accepted: 48213 Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're as…