题目:有 n 个人,x把锁,(每个人有y把钥匙),要求最少有 m 个人在场才能打开这所有的x把锁,问 x y 的最小值分别是多少。 分析: 1、公式:https://blog.csdn.net/SunMoonVocano/article/details/84137160 2、组合数大数求解,因为涉及 ...
分类:
其他好文 时间:
2019-10-11 23:10:03
阅读次数:
98
链接:https://codeforces.com/gym/102059/problem/E 题意:n个点, m条线,问这个电路是否合法,合法:可以确定一个起点和一个终点。 题解:不断的删点,删除度数为2的点,再相连,看最终度数为1的点的个数是否为2。set存图 #include <bits/std ...
分类:
其他好文 时间:
2019-10-10 22:02:04
阅读次数:
98
链接:https://codeforces.com/gym/101955/problem/G 题意:在二维平面上四种操作: 1,加一个带权的点; 2,删去一个点; 3,给一个点周围欧几里得距离为sqrt(k)的存在的点点权都加w; 4,查询一个到点欧几里得距离为sqrtk的点权和。 x, y<600 ...
分类:
其他好文 时间:
2019-10-10 20:02:16
阅读次数:
90
2017 2018 ACM ICPC Latin American Regional Programming Contest 试题地址:http://codeforces.com/gym/101889 总体情况 总共通过7题CEFGHIJ。其中我完成HIJ三题。纯属被大佬带飞系列。 解题报告 H H ...
分类:
其他好文 时间:
2019-10-07 21:38:39
阅读次数:
148
#include #define inf 0x3f3f3f3f using namespace std; /* 一道dp题,看来自己还是需要继续努力呀 dp[i]表示的是1-i个时间,所能够完美表示的2轮的车有多少个 状态转移 满足条件 dp[i]=dp[i-2]+1 dp[i]=dp[i-3] 并... ...
分类:
其他好文 时间:
2019-10-07 21:20:37
阅读次数:
77
Angle Beats $$ Time Limit: 4000 ms \quad Memory Limit: 1048576 kB $$ 题意 给出 $n$ 个初始点以及 $q$ 次询问,每次询问给出一个询问点 $Q$,求包括 $Q$ 点的直角三角形有多少个。保证 $n+q$ 个点都不重复。 思路 ...
分类:
其他好文 时间:
2019-10-07 18:01:04
阅读次数:
203
#include<bits/stdc++.h> using namespace std; /* 直接针对平方来找 每次走的是个折线 */ pair<int,int> work(int x) { int y=(int)sqrt(x*1.0+0.5); pair<int,int>ans; if(y&1&... ...
分类:
其他好文 时间:
2019-10-07 11:39:02
阅读次数:
78
规律题 首先我们要知道他的顺序是怎么来的,首先当n等于1时,是0,1 当n=2时,先按照与按顺序在他们前面分别加0,即00,01,在逆序加1,即11,10 构成的顺序为00,01,11,10;往后同理 规律,顺序排好后,对某个字符,我们对前n项求异或 即arr[i]^=arr[i-1],就可以将其转 ...
分类:
其他好文 时间:
2019-10-07 00:28:15
阅读次数:
95
Time limit: 3 seconds The local council is recording traffic flow using a pressure pad laid across the road. The pressure pad tracks whenever the whee ...
分类:
其他好文 时间:
2019-10-06 13:26:34
阅读次数:
95
题目链接:https://codeforces.com/gym/101194/attachments Problem H. Great Cells Input file: Standard Input Output file: Standard Ouptut Time limit: 2 second ...
分类:
其他好文 时间:
2019-10-06 00:37:46
阅读次数:
90