题目:https://pintia.cn/problem-sets/15/problems/718 #include<iostream> #include<algorithm> #include<vector> using namespace std ; struct mat{ int a,b,c; ...
分类:
其他好文 时间:
2020-06-14 23:20:59
阅读次数:
69
/*#!/bin/sh dir=$GEDIT_CURRENT_DOCUMENT_DIR name=$GEDIT_CURRENT_DOCUMENT_NAME pre=${name%.*} g++ -O2 $dir/$name -o $pre -g -Wall -std=c++11 if test $? ...
分类:
其他好文 时间:
2020-06-14 18:24:00
阅读次数:
52
1045 快速排序 (25分) 求划分的主元(比左边的都大,右边的都小) #include<iostream> #include<vector> #include<cctype> #include<map> #include<set> #include<sstream> #include<strin ...
分类:
编程语言 时间:
2020-06-14 10:28:39
阅读次数:
66
题目 https://www.luogu.com.cn/problem/P1616 题目分析 完全背包 代码 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int f[10000002], v ...
分类:
其他好文 时间:
2020-06-13 21:40:53
阅读次数:
63
题目 https://www.luogu.com.cn/problem/P1048 题目分析 01背包 代码 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int f[1001], v[200 ...
分类:
其他好文 时间:
2020-06-13 21:16:29
阅读次数:
51
题目 https://www.luogu.com.cn/problem/P1002 题目分析 卒可以向右、向下走,所以使用dp数组,如果自己的左边是通的(不是被马控制的节点)就把自己的dp加上自己左边的dp(上边同理),一直到最后最右下方的节点,该点的dp值就是答案 至于马的控制点:另外开一个数组, ...
分类:
其他好文 时间:
2020-06-13 21:15:13
阅读次数:
97
题目 https://www.luogu.com.cn/problem/P1802 题目分析 见代码注释 代码 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; long long f[10001 ...
分类:
其他好文 时间:
2020-06-13 21:13:43
阅读次数:
65
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int f[100010]; int a[100010],temp[100010],len; int cmp( ...
分类:
其他好文 时间:
2020-06-13 17:20:02
阅读次数:
53
#include<iostream>#include<algorithm>#include<cstring>#include<cstdio>using namespace std;const int N=1e6+10;int q[N]= {0},temp[N]={0};void merge_sort ...
分类:
编程语言 时间:
2020-06-13 12:48:12
阅读次数:
52
package club.interview.algorithm.eor; import java.util.Arrays; /** * 异或运算 == 无进位相加 * 1. 找到整数二进制最后一个1的下标位置 {@link EorT#findIndexOne(int)} } * 2. 统计整数二进 ...
分类:
编程语言 时间:
2020-06-13 12:43:18
阅读次数:
48