自闭ing之后的多校就不打了…太难了吧…

7.12多校

2020牛客暑期多校训练营(第一场) F Infinite String Comparision

少数几个会写的题 (唯二
开始想的是要lcm(n,m)然后再比较,但是好像只需要2倍的最大长度就行了

2020牛客暑期多校训练营(第一场)J Easy Integration

积分题按照找规律写qaq,赛后学长发了扩展的结论:

自闭啊没啥要补的了qaq啥也不会了
还有一件事
map存double会有精度误差
可以用数组存数据,然后sort,去重计算exp内的个数
例如 第二场的B

#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm>
#include<queue>
#include<map>
#include<set>
#include<unordered_map>
#define  endl '\n'
#define all(s) s.begin(),s.end()
#define lowbit(x) (x&-x)
#define rep(i,a,n) for (int i=a;i<=n;i++)
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mem(a,b) memset(a,b,sizeof(a))
#define fi first
#define se second
#define pb push_back
#define pi acos(-1.0)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<long double,long double> pii;
const int mod=1e9+7;
const double eps=1e-8;
const int inf=0x3f3f3f3f;
const int N=2e5+10;
double a[N], b[N] , c[N];
struct Point{double x,y;Point(double x,double y){this->x=x;this->y=y;}Point(){x=y=0;}
};
Point p[5000];
//过三点求圆心坐标
Point waixin(Point a,Point b,Point c)
{double a1 = b.x - a.x, b1 = b.y - a.y, c1 = (a1*a1 + b1*b1)/2;double a2 = c.x - a.x, b2 = c.y - a.y, c2 = (a2*a2 + b2*b2)/2;double d = a1*b2 - a2*b1;return Point(a.x + (c1*b2 - c2*b1)/d, a.y + (a1*c2 -a2*c1)/d);
}
int main()
{int n,m,q,k;cin>>n;for(int i = 1;i<=n;i++){cin >>p[i].x>>p[i].y;}int ans = 1;vector<pii> v;Point z(0,0);for (int i = 1; i <= n; i ++){for (int j = i + 1; j <= n; j ++){if(fabs(p[i].x*p[j].y-p[i].y*p[j].x)>eps){Point temp=waixin(p[i],p[j],z);// cout<<p[i].x<<" "<<p[i].y<<" "<<p[j].x<<" "<<p[j].y<<" "<<temp.x<<" "<<temp.y<<endl;v.pb(make_pair(temp.x,temp.y));}}}if(v.size()==0){cout << 1;return 0;}sort(all(v));int  now = 1;for(int i = 1; i < int(v.size()); i ++){if(abs(v[i].fi - v[i - 1].fi) < eps && abs(v[i].se - v[i - 1].se) < eps){now ++;ans = max( ans , now);}else now = 1;}for(int i = 1;i <= n ;i ++){if(i*(i-1)==2*ans){cout <<i ;break;}}}

2020 7.12 -- 7.13 两场牛客多校 + 两场 unrated的cf的补题相关推荐

  1. 2020牛客多校暑期训练营(赛后总结和补题)

    https://ac.nowcoder.com/acm/contest/5668/B AC代码: #include <iostream> using namespace std; int ...

  2. 2020 牛客多校第一场

    2020 牛客多校第一场 A. B-Suffix Array 后缀数组的思想:倍增+桶排序的方式找出一串连续序列后缀的大小.虽说正常使用的时候都是字典序,但是只要修改排序方式,也能够达到一个类似的&q ...

  3. python字符串去重及排序 牛客_2018牛客多校第一场 D.Two Graphs

    题意: n个点,m1条边的图E1,n个点,m2条边的图E2.求图E2有多少子图跟图E1同构. 题解: 用STL的全排列函数next_permutation()枚举映射.对于每一种映射枚举每一条边判断合 ...

  4. 牛客多校第二场补题(继续罚坐)

    牛客多校第二场(继续罚坐场) Draw Grids ZYT和LBC玩游戏,在4*4的矩阵中,从起点开始,每个人只能连一条直线,且只能在起点或者上一个人的终点位置连上这个位置相邻的一条直线,并且不能形成 ...

  5. 2019牛客多校第一场

    2019牛客多校第一场 题号 题目 知识点 A Monotonic Matrix B Symmetric Matrix C Fluorescent 2 D Two Graphs E Removal F ...

  6. 2019牛客多校第九场AThe power of Fibonacci(广义BM)

    2019牛客多校第九场AThe power of Fibonacci(广义BM) 题目大意 求斐波那契数列m次方的前n项和 解题思路 显然,斐波那契的m次方前缀和依然是线性递推,因此考虑用exBM求解 ...

  7. run (牛客多校第二场)计数DP

    链接:https://www.nowcoder.com/acm/contest/140/A 来源:牛客网 题目描述 White Cloud is exercising in the playgroun ...

  8. Cutting Bamboos(牛客多校第九场H主席树+二分+思维)

    链接:https://ac.nowcoder.com/acm/contest/889/H 来源:牛客网 There are n bamboos arranged in a line. The i-th ...

  9. 2019 牛客多校第二场 4/10

    题会慢慢补完的,最近在帮别人上课,补题速度很慢,一边看ppt一边刷ppt的题还要补多校的,感觉有点应付不过来,不过以后会慢慢补完的(指整个暑假) A 这场出题人的英文水平真的搞事,不说了((( 这题起 ...

最新文章

  1. linux中ctrl+z和ctrl+c的区别
  2. 图解分析一个dNet进销存软件
  3. lombok @Builder注解的使用
  4. 简单的FTP应用程序
  5. 鸡肉部位英文对照_鸡肉和鸡蛋–测试前解决Spring属性
  6. 【灵修】舍得——有舍有得
  7. 指针和引用的相同与不同
  8. SQL查看存储过程相关信息
  9. git push 到github配置(问题Pushing to Git returning Error Code 403 fatal: HTTP request failed)
  10. 木马 java_Java恶意软件来袭 木马病毒也要跨平台
  11. 如何使用segy数据绘制地震剖面
  12. 核磁共振设备工作过程人体温度监控中应用的光纤温度传感器
  13. Java毕业设计_智能快递柜的设计与实现
  14. CSS入门二、美化页面元素
  15. 【论文阅读】RAPTOR: Robust and Perception-Aware Trajectory Replanning for Quadrotor Fast Flight
  16. 在word2016中对图片插入题注
  17. 校验MD5值是什么意思?
  18. 30款后台源码。是我见过最全的后台代码。。
  19. 弃百万年薪加入创业期阿里拿500元,他证明选择和努力同样重要
  20. 第三章 人类社会及其发展规律

热门文章

  1. Bugku-啊哒+赛博朋克
  2. 【推荐算法】FM模型:Factorization Machines
  3. OpenFlow交换机概述
  4. Java-Day01,环境变量配置
  5. MT4 EA编程实例
  6. Get一个全新的网盘工具5T的OneDrive(如何领取免费的5T空间的OneDrive和Office)
  7. Python保存数据到文件的方法
  8. css画圆, 如何用纯css实现一个动态画圆环效果
  9. 蓝桥杯 ADV-327 VIP试题 研究兔子的土豪(试题解析)
  10. leetcode刷题随笔数独是否合法利用dfs求数独的解