码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
2019ICPC 沈阳 网络赛
A. 2:40:11(-7) solved by zcz 通过旋转使得抓人的在左下角,逃得在右上角 结论是逃得一定在右上 或者 右下 左上被抓住,找到规律枚举一下即可 #include<iostream> #include<cstring> #include<cstdio> #include<alg ...
分类:其他好文   时间:2019-09-14 19:11:21    阅读次数:125
2019沈阳网选——模拟
1 #include 2 using namespace std; 3 4 struct Node{ 5 string name; 6 int straight; 7 pair four; 8 pair full; 9 pair three; 10 pair,int> twopair; 11 pa.... ...
分类:其他好文   时间:2019-09-14 18:40:04    阅读次数:79
Educational Codeforces Round 72 (Rated for Div. 2)E(线段树,思维)
#define HAVE_STRUCT_TIMESPEC#include<bits/stdc++.h>using namespace std;#define BUF_SIZE 100000bool IOerror=0;//加了读入挂才1900ms+卡ddl过的,不加读入代码tleT_Tinline ...
分类:其他好文   时间:2019-09-14 11:09:41    阅读次数:71
CF12D Ball(cdq)
同样鸽了很久的三维偏序,不同点在于保证没有重复的三元组,但是要求的是严格大于。 基本思路跟带等号的cdq一模一样,但是要极度注意一个细节 比如有两个三元组(1 1 1)和(1 2 3),在三个元素都严格大于的情况下,显然第二个三元组不能大于第一个三元组 这意味着在对初始序列执行第一次排序的时候,首先 ...
分类:其他好文   时间:2019-09-12 23:24:54    阅读次数:130
F - One Occurrence CodeForces - 1000F (线段树+离线处理)
You are given an array aa consisting of nn integers, and qq queries to it. ii th query is denoted by two integers lili and riri. For each query, you h ...
分类:其他好文   时间:2019-09-12 15:06:55    阅读次数:85
Codeforces Round #283 (Div. 2)C、D、E题解
C. Removing Columns https://codeforc.es/contest/496/problem/C 从前往后标记那些前面已经确定字典序合法的行,对于字典序不合法又没被标记的直接删除该列。 D. Tennis Game https://codeforc.es/contest/4 ...
分类:其他好文   时间:2019-09-11 13:52:35    阅读次数:109
2019年9月7日(贪心专题考试)
难受,炸$long~long$,$QwQ$ "$prob1:Maximal~GCD$" 一句话:注意判炸$long~long$ 没公约数的情况不用说了,若有设其为$p$,很明显$n$为$p$的倍数,此时可以将序列的和化为$n/p$个$p$的和,又$n/p$个最少为$k (k+1) 1$个,所以就得到 ...
分类:其他好文   时间:2019-09-10 20:59:50    阅读次数:136
201903-4 消息传递接口 (80')
最后一个点T,不知道怎么优化比较好。 c++ include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair pii; define pb(x) push_back(x) ...
分类:其他好文   时间:2019-09-10 00:41:02    阅读次数:102
2019徐州网络赛
I 题 query 题目链接 题目大意是给一个N(<=1e5) permutation p (下标从1开始) , 现在定义一种pair( i ,j) ,其满足 min(pi?,pj?)=gcd(pi?,pj?),现在有M (<=1e5) 组区间查询[l,r]询问 满足 l <= i < j <= r ...
分类:其他好文   时间:2019-09-09 19:22:51    阅读次数:89
PAT甲级——A1127 ZigZagging on a Tree【30】
Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and ino ...
分类:其他好文   时间:2019-09-06 22:39:34    阅读次数:112
2800条   上一页 1 ... 62 63 64 65 66 ... 280 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!