- 浏览: 4466 次
最新评论
文章列表
uva11093贪心算法
- 博客分类:
- 算法题
//uva11093
//贪心算法,加油站环路,O(n)
#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
const int N = 100005;
int n,res,i,j,d,T,t,s;
int p[N], x[N];
int main()
{
scanf("%d", &T);
for (j = 1; j <= T;j++) {
scanf("%d", ...
uva1451贪心算法,求平均值最大的子序列
- 博客分类:
- 算法题
//uva1451,0.07s
//贪心算法,求平均值最大的子序列
//数形结合,求最大斜率
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
const int N = 100005;
int n;
int front[N], s[N];
char c[N];
double aotu(int x1, int x2,int x3, int x4) {
return (s[x4 ...
#include<iostream>
#include<vector>
#include<ctime>
#include<algorithm>
#include<cstdio>
using namespace std;
int n, maxd;
int wrongn(int *p, int a, int b) {
int t = 0;
for (int i = a; i < b; i++) {
if (p[i + 1] - p[i] != 1) t++;
}
return t;
}
...
uva 1599双向bfs
- 博客分类:
- 算法题
//0.140s
#include<iostream>
#include<queue>
#include<cstring>
#include<vector>
using namespace std;
const int maxn = 100005;
const int inf = 1 << 30;
int i, a, b, c, n, m;
bool vis[maxn];
struct node {
int v; int c;
node* next;
}G[maxn * 4];
node *adj ...
安装wps后无法打开
查看动态链接库
ldd /opt/kingsoft/wps-office/office6/wps /opt/kingsoft/wps-office/office6/wpp /opt/kingsoft/wps-office/office6/et |grep "not found" |cut -d' ' -f1 |sort |uniq
安装缺少依赖
sudo apt-get install libsm6:i386
搞定。不需要安装ia32-libs库。
参考添加命令
dpkg --add-architecture i386 ...