NN is an experienced internet user and that means he spends a lot of time on the social media. Once he found the following image on the Net, which asked him to compare the sizes of inner circles: It turned out that the circles are equal. NN was very…
推公式,水题.cos()函数是默认弧度制的 #include <iostream> #include <cstring> #include <string> #include <map> #include <set> #include <algorithm> #include <fstream> #include <cstdio> #include <cmath> #include <stac…
题目链接:https://vjudge.net/problem/CodeForces-1100C 题意: 题目给出外部圆的数目n和内部圆的半径r,要求求出外部圆的半径以满足图片要求. 显然这是一道数学题,需要通过分析图形构成解出待求半径. 分析: 从图中可以看出,∆OoD为一个直角三角形, ,容易得到关系: 解得R的值为: 代码如下: #include <iostream> #include <cstring> #include <cstdio> #include &l…
题目链接:http://codeforces.com/contest/1100/problem/C 题目大意:给你n和r,n指的是有n个圆围在里面的圆的外面,r指的是里面的圆的半径,然后让你求外面的圆的半径. 具体思路:,我们就可以列出等式,sin(2*pi/(2*n))=R/(R+r). 然后就直接解等式就可以了. AC代码: #include <iostream> #include <cstdio> #include <cstdlib> #include <c…
题目链接:NN and the Optical Illusion 题目原文 NN is an experienced internet user and that means he spends a lot of time on the social media. Once he found the following image on the Net, which asked him to compare the sizes of inner circles: It turned out th…
A and B and Team Training time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A and B are preparing themselves for programming contests. An important part of preparing for a competition is shar…
实在太冷了今天 taxi :错误原因1 忽略了 1 1 1 1 和 1 2 1 这种情况,直接认为最多两组一车了 2 语句顺序错 double cola: 忘了减去n的序号1,即n-- B. Taxi time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output After the lessons n groups of schoolchi…
链接:https://codeforces.com/contest/1100/problem/C 题意: 一个圆球外面由其他圆球包裹,两两相连. 给出n,r. n为外面圆球数量,r为内部圆球半径. 求外面圆半径R. 思路: 将内圆和外面两个相邻圆圆心连线,成三角形,将内圆圆心与内圆与外圆交点连线. 可得出公式. 代码: #include <bits/stdc++.h> #define PI 3.1415926535 using namespace std; int main() { int n…
LINK:Quantifier Question 题面过长 引起不适 读题花了好长时间 对于 和 存在符合不是很熟练 导致很懵逼的做完了. 好在还算很好想.不过wa到了一个坑点上面 自闭一大晌 还以为自己思路错了 看了某个强者的blog才知道自己有个地方没处理好. 题目中明确指出 这种关系运算符只能顺序的添加 也就是说 \(\forall x_2\exists x_1\) 这是不能被表达的 只能表达出\(\exists x_1\forall x_2\) 如果有题目中的f函数 那么后者将会被判定为…
题意: m个水果,n个价格.每种水果只有一个价格. 问如果给每种水果分配价格,使得买的m个水果总价格最小.最大. 输出最小值和最大值. 思路: 贪心. 代码: bool cmp(int a,int b){ return a>b; } string name; map<string,int> mp; int price[200],fruit[200]; int cn; int n,m; int main(){ cin>>n>>m; mp.clear(); cn=0;…