数据 http://files.cnblogs.com/htfy/data.zip 简要题解 桌球碰撞 纯模拟,注意一开始就在袋口和v=0的情况.v和坐标可以是小数.为保险起见最好用extended/double类型. program prob1; var ans:array[0..6,0..600] of longint; n,i,j:longint; a0,r0,px,py,vx,vy,left,t,newp:extended; flag:boolean; function dist(x1,
A.拆地毯 题目:http://www.contesthunter.org/contest/CH%20Round%20%2352%20-%20Thinking%20Bear%20%231%20(NOIP模拟赛)/拆地毯 题解:按最大生成树顺序加k条边即可 代码: +; ..maxn] of int64; fa,a,b:..maxn] of longint; i,j,n,m,k:longint; ans:int64; function find(x:longint):longint; begin
A.数三角形 题目:http://www.contesthunter.org/contest/CH%20Round%20%2348%20-%20Streaming%20%233%20(NOIP模拟赛Day1)/数三角形 题解:暴力枚举三元组,判断是否共线即可,用叉积 代码: type cp=record x,y:double; end; ..] of cp; i,j,k,n,ans:longint; function cross(a,b,c:cp):double; begin cross:=(b