算法
qq_43600890
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Kattis - convoy 二分
题目链接#include<iostream>#include<stdio.h>#include<algorithm>using namespace std;typedef long long ll;int a[21000];int n,k;bool check(ll t){ ll cnt=0,num=0; for(int i=0;i&...原创 2020-05-01 10:36:26 · 408 阅读 · 0 评论 -
产生随机数
一、产生从a到b的随机数#include <random>std::mt19937 rnd(0);#define random(a,b) rnd()%(b-a+1)+a二、产生从0到n-1的随机数#include<cstdlib>#include<ctime>srand(time(NULL));rand() * rand() % n...原创 2019-11-24 18:32:33 · 228 阅读 · 0 评论 -
Math Problem 找一个所有区间都至少包含一个点的最小区间
Math Problem( 找一个所有区间都至少包含一个点的最小区间) int t;scanf("%d",&t); while(t--){ int l=-1,r=1e9+10; int n;scanf("%d",&n); for(int i=0;i<n;i++){ int a,b;scanf("%d%d",&a,&b); l=m...原创 2019-11-24 18:14:15 · 177 阅读 · 0 评论
分享