https://cn.vjudge.net/problem/Gym-101991J 题目很长,其实就是给你一个正三角形,并且告诉你它的中点在Z轴上以及法向量,边长和顶点A的坐标(自由度已定),让你求A,B,C到Z轴上一点H的距离. 题解:高考向量题,考虑正三角形ABC,我们把OB拆成OD加DB,OD=-OA/2,DB可以通过连立三个方程得到(它垂直于AO和法向量,他的长度为L/2) 坑: 我一开始拆的是OA+AB,公式太长不可解orz, 后来解方程的时候写错了orz 然后y写成xorz 最后没考…
CCPC网赛第八题,求立体几何数量,题解见注释 //立体几何-求满足要求的四面体个数 //要求1:至少4条边相等 //要求2:四条边相等时,另两条边一定不相邻(即对边) //题解:以当前边为不相邻的其中一条边,对可以构成等腰三角形的第三点进行枚举 //再对这些第三点的集合做一次n^2的枚举,分两种情况找出四面体 //如果四条边或五条边相同,则只存在两种重复情况(当前边和对边互换) //如果六条边相同,则存在六种重复情况(每个边作一次当前边) //Time:499Ms Memory:1576K #…
http://codeforces.com/gym/101967/attachments 题意:定义了一个甜甜圈.(torus) 不是让你二重积分啦233 现在有一个星球是甜甜圈形状的,它有四条很关键的纬线,南极北极里赤道外赤道.同时有n条均匀分布的经线.每一圈经线和四条和纬线交出四个点.现在你从内赤道的某圈经线上出发,沿着经纬线访问所有的经线,访问的意思是:对于每个经线,至少走过其与两条纬线的交点. 题解:照着样例摸一下,不用算法,只是很细节. #include <iostream> #in…
前言:首先先推荐一篇博客,关于webgl原理,讲的非常之通俗易懂了 图解WebGL&Three.js工作原理  webGL可以理解为openGL ES2.0 (webGL2.0 - openGL ES3.0)的javascript绑定.所以实现的语言是javascript和opengl(最常用的跨平台图形库)着色语言,webgl是 HTML5中提出的新技术,是一种3D绘图标准. three.js是以webgl为基础的库,封装了一些3D渲染需求中重要的工具方法与渲染循环.WebGL门槛相对较高,T…
并没有做到这道题,后来听学长说了题意,总之就是立体几何嗯 看了好几份题解,是的我知道是异面线段的距离了,可是看码完全不明orz. 这时候出现了一份清晰易懂甚至给出了公式来源的blog╰(*°▽°*)╯ 仔细一看是kuangbin的blogΣ(⊙▽⊙"让我先%一%orz http://blog.sina.com.cn/s/blog_a401a1ea0101ij9z.html公式Time Tunnel在此 <!----------这部分是解释给以后看不懂的自己的----------> (…
题目链接:https://codeforces.com/gym/102056/problem/L LCR is really an incredible being. Thinking so, sitting on the plane and looking at the sea, Rikka savours the fantastic journey. A fire never happened. It must be interesting to share it with her mate…
http://codeforces.com/gym/100801 题目大意:有从左到右有n个车站,有n-1种车票,第i种车票一次最多可以坐 i 站(1<=i<=n)   每种票有固定的价钱p[i],下车后可以继续上车,但每次下车都要再上车都要花费一定时间v[i],第1和n站上车不花费时间,车从一站到相邻的一站需要1分钟.只能买一种车票,问在t时间内 所有能从第1站到 第n站的方案  花费 的票价最低是多少. 解题思路: 这道题的关键在于如何求每种票起点到达终点所需的最少时间,如果找出了每种票到…
分析:利用内外圆知识知道,B,C两点到 AD 的距离$\le4$. 利用体积公式$V=\frac{1}{3}S_{截面}|AD|\le2\sqrt{15}$…
tetrahedron/center> 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5726 Description Given four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD. Input Multiple test cases (test cases ≤100). Each test cases contains a lin…
评:最后用到了中间的截面三角形两边之和大于第三边.能不能构成三棱锥时考虑压扁的"降维"打击是常见的方式.…
题意: 现在有1,2,3...N这N个站, 给定限定时间Limt,  N-1种票的价格, 分别对应一个最远距离,  叫你选择一种票, 满足可以在规定时间到达N站台,而且价格最低 思路: 如果买距离为L的票可以在规定时间到,那么距离>L的票也一定能到. 我们只需要二分出这个下界 L,然后在>=L里选择一个最低价格即可. 二分里面用单调队列优化. 复杂度O(NlgN). (注意可能爆 long long #include<bits/stdc++.h> #define ll long l…
题意:求1到N的最短路,最短路的定义为路径上最大的K条边. 思路:对于每种边权,假设为X,它是第K大,那么小于X的变为0,大于K的,边权-X.然后求最短路,用dis[N]+K*X更新答案. 而小于K的情况下,最短路显然就是原图的最短路.(还是不好想的 #include<bits/stdc++.h> #define ll long long #define mp make_pair #define pii pair<ll,int> #define F first #define S…
传送门 题面 题解 不难看出每个点的大小为行列限制中较小的那一个(因为数据保证有解) 对于行的每个限制,能取到的个数是列里限制大于等于它的数的个数,同理,对于列是行里大于它的个数(这里没有等于,为了避免重复计算) 于是可以对于行列分别开权值线段树,修改的时候只要把对应的贡献改一下就好了 //minamoto #include<bits/stdc++.h> #define R register #define ll long long #define fp(i,a,b) for(R int i=…
Problem B Tree of Almost Clean Money Input File: B.in Output File: standard output Time Limit: 4 seconds (C/C++) Memory Limit: 256 megabytes The tree of Almost Clean Money (or ACM Tree, for short) consists of N (1≤N≤500000) vertices in which, well, (…
2015年 WordPress 插件和主题的数量继续在增长.这一年,我们可以期待WP主题引入一些新的技术,从背景,自适应响应式图像到从背景图片中提取主色. 本文包含25款最近发布的 WordPress 主题列表.这些主题都是优质,免费的,响应式的,你可以在你博客中立即使用它们. 您可能感兴趣的相关文章 太赞了!超炫的页面切换动画效果[附源码下载] 创意无限!一组网页边栏过渡动画[附源码下载] 好东西!动感的页面加载动画效果[附源码下载] 使用 CSS3 实现3D图片滑块效果[附源码下载] 时尚设…
Problem H. ICPC QuestTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/attachments Description Noura Boubou is a Syrian volunteer at ACM ACPC (Arab Collegiate Programming Contest) since 2011. She graduated from Tishreen Un…
B. Lunch Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100637/problem/B Description The swamp looks like a narrow lane with length n covered by floating leaves sized 1, numbered from 1 to n with a fly sitting on the top of ea…
Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 25950   Accepted: 8853 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. When…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Invitation Cards Time Limit: 5 Seconds      Memory Limit: 65536 KB In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fa…
Problem J. Journey with Pigshttp://codeforces.com/gym/241680/problem/J考察排序不等式算出来单位重量在每个村庄的收益,然后生序排列猪的重量也生序排列此时价值最大 #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #include<cmath> #include<ctime>…
题目链接:http://codeforces.com/gym/101164/attachments 题意:对于已知的 n 个二维坐标点,要求按照某种特定的连线方式将尽可能多的点连接(任意相邻的 3 个点 a , b , c ,点 c 必须在有向线段 ab 的左侧.问最多可以连多少点,并给出连线顺序. 思路:因为连接最多的点,尽量让形成一个凸包将点包起来,形成螺旋式的连接所有的点,凸包模板: #pragma comment(linker, "/STACK:1024000000,1024000000…
题面 传送门 题解 先理一下关于立体几何的基本芝士好了--顺便全都是从\(xzy\)巨巨的博客上抄来的 加减 三维向量加减和二维向量一样 模长 \(|a|=\sqrt{x^2+y^2+z^2}\) 点积 两个向量\(a,b\)的点积还是代表\(a\)在\(b\)上的投影长\(\times b\)的模长,也有$a\cdot b=|a||b|\cos<a,b> \(,坐标上有\)(x_1,y_1,z_1)\cdot (x_2,y_2,z_2)=(x_1x_2,y_1y_2,z_1z_2)$ 叉积…
layout: post title: (寒假开黑gym)2018 ACM-ICPC, Syrian Collegiate Programming Contest author: "luowentaoaa" catalog: true tags: mathjax: true - codeforces 传送门 付队! 许老师! Hello SCPC 2018! (签到) #include<bits/stdc++.h> using namespace std; typedef…
layout: post title: (寒假开黑gym)2018 USP Try-outs author: "luowentaoaa" catalog: true tags: mathjax: true - codeforces 传送门 付队! 许老师! B.Aesthetics in poetry (暴力模拟) #include<bits/stdc++.h> using namespace std; typedef long long ll; const ll mod=…
题目很水.睡过了迟到了一个小时,到达战场一看,俩队友AC五个了.. 就只贴我补的几个吧. B - Breaking Biscuits Gym - 101606B 旋转卡壳模板题.然后敲错了. 代码是另一种做法:对于每条边,枚举两边的所有点到直线的距离,分别取最大值,然后加起来. #include <bits/stdc++.h> #define FOPI freopen("in.txt", "r", stdin); #define FOPO freopen…
1.工具类 import com.hujiang.project.zhgd.Util; import com.itextpdf.text.BaseColor; import com.itextpdf.text.Document; import com.itextpdf.text.Font; import com.itextpdf.text.pdf.BaseFont; import com.itextpdf.text.pdf.PdfWriter; import com.itextpdf.tool.…
原题链接:http://codeforces.com/gym/100203/attachments/download/1702/statements.pdf 题解 给你平面上若干点,生成一颗完全图,让你生成一颗最小生成树.模板题.图中已经有了的边要将权值置0.代码是队友写的. 代码 #include <iostream> #include <cstring> #include <cstdlib> #include <cstdio> #include <…
bryce1010模板 http://codeforces.com/gym/101810 #include <bits/stdc++.h> using namespace std; #define ll long long const int MAXN=1010; int a[MAXN<<1]; int main() { int t; cin>>t; int n; while(t--) { cin>>n; for(int i=1;i<=2*n;i++)…
bryce1010模板 http://codeforces.com/gym/101810 #include<bits/stdc++.h> using namespace std; #define ll long long ll a[1000005]; int main() { int t,n,temp; ll ans,maxn,minl,x; scanf("%d",&t); while(t--) { scanf("%I64d",&n);…
bryce1010模板 http://codeforces.com/gym/101810 #include<bits/stdc++.h> using namespace std; #define ll long long const ll maxn = 1e5 + 5; const ll mod = 1e9+7; ll n; ll p[maxn]; ll vis[maxn]; int main() { ll t; scanf("%lld",&t); ll pre;…