https://www.luogu.com.cn/problem/P1223 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n; 4 struct t{ //定义结构体存放等待时间和排队编号 5 int w, no; 6 }; 7 t ...
分类:
其他好文 时间:
2020-07-22 20:56:08
阅读次数:
73
Assigning a balloon color to each problem is one of the tasks we need to do every year, and sometimes itis tricky. We noticed that some contestants as ...
分类:
其他好文 时间:
2020-07-22 20:29:29
阅读次数:
62
https://www.luogu.com.cn/problem/P3846 \(BSGS\) $BSGS$可以$O( \sqrt )$处理: \[ b^l \equiv n (mod \quad p) \] 处理方法十分常规 \[ 令t=\sqrt{p}+1\\ 设l=kt-m\\ 则b^{kt- ...
分类:
其他好文 时间:
2020-07-22 20:25:55
阅读次数:
67
##题面 Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n-1)+F(n-2)(n>=3); 所以,1,2,3,5,8,13……就是菲波那契数列。 在HDOJ上 ...
分类:
其他好文 时间:
2020-07-22 15:43:22
阅读次数:
61
题目链接:https://codeforces.com/contest/1382/problem/D 题意 给出一个大小为 $2n$ 的排列,判断能否找到两个长为 $n$ 的子序列,使得二者归并排序后能够得到该排列。 题解 将原排列拆分为一个个连续子序列,每次从大于上一子序列首部的元素处分出下一连续 ...
分类:
其他好文 时间:
2020-07-22 15:28:16
阅读次数:
80
题目链接 #解题思路 询问区间小于某个数个个数显然可以用二分来做,但是如果配合上区间加法就有些复杂了。即使对每个区间排序,用标记来代替修改,但是对于边缘的数据来说,需要暴力修改,而暴力修改后打破区间的有序性。那就暴力修改之后再重新排序~~(没错,就是这么狠(笑~~ #代码 const int max ...
分类:
其他好文 时间:
2020-07-22 11:22:40
阅读次数:
54
https://zjusummer.contest.codeforces.com/group/clkkguw3vK/contest/102661/problem/D 对于一个节点,设有食物时为黑色,无食物时为白色,可以发现,一个节点顶多经历三个阶段 $1.$一直是白色 $2.$黑白闪烁 $3.$一直 ...
分类:
其他好文 时间:
2020-07-21 23:22:12
阅读次数:
78
HDU - 2256 神仙题,完全没想到。 朴素想法,我们开4*4的矩阵,分别记录$\sqrt{2}\(,\)\sqrt{3}\(,\)\sqrt{6}$,$1$的系数,然后快速幂。 但是我们没法对系数取模,因此不能确定整数部分。 再分析一下,题目让我们求$(\sqrt{2} + \sqrt{3}) ...
分类:
其他好文 时间:
2020-07-21 22:39:27
阅读次数:
61
题目链接:https://www.acwing.com/problem/content/252/ 题目给出一些点的坐标,质量,磁力和吸引半径,初始时刻只有一个磁石在(x0,y0)位置,可以通过磁石吸引其他磁石,然后选择磁石继续进行吸引,问最终可以得到多少磁石? 由于磁石的吸引要满足距离小于吸引半径, ...
分类:
编程语言 时间:
2020-07-21 22:16:27
阅读次数:
63
https://www.luogu.com.cn/problem/P1030 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0) 3 #include <bits/stdc++.h> ...
分类:
其他好文 时间:
2020-07-21 21:48:07
阅读次数:
55