4436: Easy Math Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.scu.edu.cn/soj/problem.action?id=4436 Description Given n integers a1,a2,…,an, check if the sum of their square root a1+a2+…+an is a integer. Input The input consists of multiple…
Party n frogs are invited to a tea party. Frogs are conveniently numbered by 1,2,-,n. The tea party has black and green tea in service. Each frog has its own preference. He or she may drink only black/green tea or accept both. There are m pairs of fr…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4727 题目大意:队列里所有人进行报数,要找出报错的那个人 思路:,只要找出序列中与钱一个人的数字差不是1的人即可,但是要注意的是这些人是从一个队列中间截取下来的,所以很有可能第一个人就报错了,一开始没有考虑这种状况所以出错了 #include<cstdio> #include <iostream> using namespace std; int main() { int t,n,an…
A. Easy Math Time Limit: 2000ms Memory Limit: 65536KB Given n integers a1,a2,-,an, check if the sum of their square root a1−−√+a2−−√+⋯+an−−√ is a integer. Input The input consists of multiple tests. For each test: The first line contains 1 integer n…