码迷,mamicode.com
首页 >  
搜索关键字:do while    ( 38720个结果
面试题29:顺时针打印矩阵
本体考察数组的使用。注意本体使用vector的指针形式。 C++版 #include <iostream> #include <vector> #include <algorithm> using namespace std; void printMatrixInCircle(vector<vect ...
分类:其他好文   时间:2020-07-27 13:53:20    阅读次数:79
代码实例
. PHP 和 MySql 代码实例 query("SELECT CompanyName, City, Country FROM Customers"); $outp = ""; while($rs = $result->fetch_array(MYSQLI_ASSOC)) { if ($outp ...
分类:其他好文   时间:2020-07-27 09:52:06    阅读次数:76
HDU 1518 Squre
Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contains N, the number ...
分类:其他好文   时间:2020-07-27 09:42:59    阅读次数:80
二叉树的三种遍历非递归实现(栈) 以及层序遍历(队列)(java)
先序遍历:根-->左-->右的形式 public static void preOrderTraveralWithStsck(Node node){ Stack<Node> stack = new Stack(); //当节点的左右孩子全为空并且,栈空表示遍历完毕 while (node != nu ...
分类:编程语言   时间:2020-07-27 09:42:07    阅读次数:81
VJ A - Three Indices 7.26
#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;const ll nl=1e5+5;/ ...
分类:其他好文   时间:2020-07-26 23:23:20    阅读次数:105
Luogu P3387 【模板】缩点
###思路 这个题不难,就是先Trajan缩点减小点数和边数的规模,然后在缩完点的图上跑DP即可。注意要用toposort解决DP后效性(或者是使用记忆化搜索)。 Code #include<iostream> #include<cstdio> #include<algorithm> #includ ...
分类:其他好文   时间:2020-07-26 23:07:29    阅读次数:56
最小瓶颈路(Network) 加强版(Kruskal重构树+欧拉序求lca)
题目描述 给定一个 \(n\) 个点 \(m\) 条边的无向连通图,编号为 $1$ 到 \(n\) ,没有自环,可能有重边,每一条边有一个正权值 \(w\) 。 给出 \(q\) 个询问,每次给出两个不同的点 \(u\) 和 \(v\) ,求一条从 \(u\) 到 \(v\) 的路径上边权的最大值最 ...
分类:Web程序   时间:2020-07-26 19:44:14    阅读次数:96
自已编写字符串查找函数
1 int StringSearch(char str[], char strSearch[]) 2 { 3 int i = -1; 4 while (str[i]) 5 { 6 char c = strSearch[0];//锁定查找字符的第1位置 7 if (str[i] != c)//判断查找 ...
分类:其他好文   时间:2020-07-26 19:42:00    阅读次数:54
python实现斐波那契数列
首先想到的是用递归来解决 求100内的斐波那契数列: def diGui(num=100): a,b = 0,1 # 为了方便看打印,我就用list存一下 lit = [] while a < num: # print(a) lit.append(a) a, b = b,a+b print(lit) ...
分类:编程语言   时间:2020-07-26 19:26:30    阅读次数:69
eclipse项目中出现红叉
eclipse中选择->window->show view->other弹出对话框中选择general下面找problems然后双击,即可查看红叉原因. 我的项目报 :An error occurred while filtering resources 解决方案: 1.右键项目 2找到maven ...
分类:系统相关   时间:2020-07-26 19:12:44    阅读次数:88
38720条   上一页 1 ... 91 92 93 94 95 ... 3872 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!