题意:给定 n 个数(小于等于7),让你把它分成 m 组,每组有三个数,且满足,a < b < c,并且 a 能整除 b,b 能整除 c. 析:对于这个题,因为题目说了是不大于7的,那么一想不就三组数么,124,136,126.就这三组,然后确定每一组的数量,首先只有第二组有3,那么第二组的数量就确定了, 然后再看剩下的两组,只有第一组有4,那么第一组也就确定,然后剩下的就是第三组,当然第三组只有6. 代码如下: #include <bits/stdc++.h> using nam…
题目链接: 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…
Problem G.Giant ScreenTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86821#problem/G Description You are working in Advanced Computer Monitors (ACM), Inc. The company is building and selling giant c…
题目链接: A. Round House time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya lives in a round building, whose entrances are numbered sequentially by integers from 1 to n. Entrance n and entra…
B. BerSU Ball time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The Berland State University is hosting a ballroom dance in celebration of its 100500-th anniversary! n boys and m girls are al…
题目链接: A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given array consisting of n integers. Your task is to find the maximum length of an increasing subarray of…