码迷,mamicode.com
首页 >  
搜索关键字:push_back    ( 578个结果
「日常训练」School Marks(Codeforces Round 301 Div.2 B)
题意与分析(CodeForces 540B) 代码 cpp include include include include define MP make_pair define PB push_back define fi first define se second define ZERO(x) ...
分类:其他好文   时间:2018-09-30 00:01:03    阅读次数:257
「日常训练」Ice Cave(Codeforces Round 301 Div.2 C)
题意与分析(CodeForces 540C) 代码 cpp include include include include include include define MP make_pair define PB push_back define fi first define se second ...
分类:其他好文   时间:2018-09-30 00:00:03    阅读次数:209
「日常训练」Bad Luck Island(Codeforces Round 301 Div.2 D)
题意与分析(CodeForces 540D) 代码 cpp include include include include include define MP make_pair define PB push_back define fi first define se second define ...
分类:其他好文   时间:2018-09-29 23:50:53    阅读次数:184
leetcode905
vector sortArrayByParity(vector& A) { vector EVEN;//偶数 vector ODD;//奇数 for (auto a : A) { if (a % 2 == 0)//EVEN { EVEN.push_back(a); } else... ...
分类:其他好文   时间:2018-09-27 13:11:25    阅读次数:135
HDU5119 - Happy Matt Friends
HDU5119 Happy Matt Friends 做法:拆成两堆数,分别暴力出两组的所有异或值A,B,枚举A, 将B全部插入Trie树,通过枚举的数每一位的值,确定异或后构成的新树,然后在新树上统计比m大的值的个数即可。 c++ include define pb push_back typed ...
分类:移动开发   时间:2018-09-27 01:34:11    阅读次数:181
HDU5877 - Weak Pair
HDU5877 Weak Pair 做法:dfs的时候,用树状数组维护当前节点到跟节点的权值树状数组,离散化一下即可,类似统计树上逆序对。此题数据范围好像是假的,节点数开到200000可过。 c++ include define pb push_back typedef long long ll; ...
分类:其他好文   时间:2018-09-26 13:03:22    阅读次数:147
BM求递推式模板
```c++ include using namespace std; define rep(i,a,n) for (long long i=a;i=a;i ) define pb push_back define mp make_pair define all(x) (x).begin(),(x) ...
分类:其他好文   时间:2018-09-24 18:58:13    阅读次数:128
LeetCode--225--用队列实现栈
问题描述: 使用队列实现栈的下列操作: push(x) -- 元素 x 入栈 pop() -- 移除栈顶元素 top() -- 获取栈顶元素 empty() -- 返回栈是否为空 注意: 你只能使用队列的基本操作-- 也就是 push to back, peek/pop from front, si ...
分类:其他好文   时间:2018-09-19 16:17:37    阅读次数:139
Leetcode 26
class Solution { public: int removeDuplicates(vector& nums) { int res = 0; nums.push_back(INT_MAX); //注意末尾的补位 for(int i=0;i < nums.size()-1;i++){ if(n... ...
分类:其他好文   时间:2018-09-18 11:14:55    阅读次数:117
2018焦作网络赛A
water #include <bits/stdc++.h> #include <unordered_set> #include <unordered_map> #define pb push_back #define mp make_pair #define x first #define y s ...
分类:其他好文   时间:2018-09-16 12:31:40    阅读次数:152
578条   上一页 1 ... 17 18 19 20 21 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!