UPC-5095 - Hopscotch - 思维
题目链接:http://exam.upc.edu.cn/problem.php?id=5095题目:题目描述You’re playing hopscotch! You start at the origin and your goal is to hop to the lattice point (N, N). A hop consists of going from lattice poi...
题目链接:http://exam.upc.edu.cn/problem.php?id=5095题目:题目描述You’re playing hopscotch! You start at the origin and your goal is to hop to the lattice point (N, N). A hop consists of going from lattice poi...
题目链接:http://exam.upc.edu.cn/problem.php?id=4979题目:题目描述Your friend from Manhattan is visiting you in Amsterdam. Because she can only stay for a short while, she wants to see as many tourist attracti...
题目链接:http://exam.upc.edu.cn/problem.php?id=5579题目:题目描述Snuke is having another barbeque party.This time, he will make one serving of Skewer Meal.He has a stock of N Skewer Meal Packs. The i-th Skewe...
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=3505题目:Description给定一个nxm的网格,请计算三点都在格点上的三角形共有多少个。下图为4x4的网格上的一个三角形。注意三角形的三点不能共线。Input输入一行,包含两个空格分隔的正整数m和n。Output输出一个正整数,为所求三角形数量。Sample Input2 2S...
题目链接:http://exam.upc.edu.cn/problem.php?id=5841题目:题目描述数轴上有n个点,第i个点的坐标为xi,权值为wi。两个点i,j之间存在一条边当且仅当abs(xi-xj)>=wi+wj。你需要求出这张图的最大团的点数。(团就是两两之间有边的顶点集合)输入第一行一个整数n,接下来n行每行两个整数xi,wi。输出输出一行一个整数,表示最大团的点数。...