题意:给你一组数,让你先选一个数,然后把其他数缩小成他的倍数,然后求和,求最大值. 思路:很显然,对于数i,在i*j到i*(j+1)-1之间的数都应该缩小成i*j,又由于数均小于等于200000这个通过前缀和就可以解决 #include <bits/stdc++.h> using namespace std; typedef long long ll; ]; int val; int main() { int n; scanf("%d",&n); ;i<=n;…
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... 其实这个应该是昨天就写完的,不过没时间了,就留到了今天.. 地址:http://codeforces.com/contest/651/problem/A A. Joysticks time limit per test 1 second memory limit per test 256…
CF memsql Start[c]UP 2.0 A A. Golden System time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Piegirl got bored with binary, decimal and other integer based counting systems. Recently she dis…
CF memsql Start[c]UP 2.0 B B. Distributed Join time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Piegirl was asked to implement two table join operation for distributed database system, minim…