A.Common Subsequence 题意 给你两组数,问你有没有相同 的书,有的话,输出最短的那组(大家都知道,1是最小的) AC ?#include<bits/stdc++.h> using namespace std; const int N = 1005; int a[N], x, n, ...
分类:
其他好文 时间:
2020-07-26 00:42:50
阅读次数:
59
冒泡排序 ''' 冒泡排序算法的运作如下: 比较相邻的元素。如果第一个比第二个大(升序),就交换他们两个。 对每一对相邻元素作同样的工作,从开始第一对到结尾的最后一对。最后的元素会是最大的数。 针对所有的元素重复以上的步骤,除了最后一个。 持续每次对越来越少的元素重复上面的步骤,直到没有任何一对数字 ...
分类:
编程语言 时间:
2020-07-26 00:38:05
阅读次数:
77
<?php // clearDir('upload/images/'); if ($_FILES['file']['error'] == 0) { $MAX_FILE_SIZE = 300000; if ($_FILES['file']['size'] > $MAX_FILE_SIZE) { exi ...
分类:
Web程序 时间:
2020-07-26 00:34:37
阅读次数:
73
forEachRemaining()是java1.8新增的Iterator接口中的默认方法对于这个方法,官方文档是这么描述的:Performs the given action for each remaining element until all elements have been proce ...
分类:
其他好文 时间:
2020-07-26 00:20:40
阅读次数:
200
1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <vector> 5 using namespace std; 6 const int SIZE = 1e6; 7 int heap[SIZE], ...
分类:
编程语言 时间:
2020-07-25 23:58:20
阅读次数:
91
4.3.2 等待/通知机制 一个线程修改了一个对象的值,而另一个线程感知到了变化,然后进行相应的操作,整个过程开始于一个线程,而最终执行又是另一个线程。前者是生产者,后者就是消费者,这种模式隔离了“做什么”(what)和“怎么做”(How),在功能层面上实现了解耦,体系结构上具备了良好的伸缩性,但是 ...
分类:
编程语言 时间:
2020-07-25 23:37:56
阅读次数:
68
windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间,包括A和B,总共有多少个windy数? 输入格式 包含两个整数,A B。 输出格式 一个整数 数据范围和提示 【数据规模和约定】 100%的数据,满足 1 <= A < ...
XAML: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft ...
##绪论 算法:即是在特定计算模型下,旨在解决特定问题的指令序列 要保证正确性、确定性、可行性、有穷性 有穷性: ###例子1:HailStone序列 @Test public void test1() { int n = 7; int length = 1; while (n > 1) { n = ...
分类:
编程语言 时间:
2020-07-24 22:12:42
阅读次数:
88
【原题】 Description Rain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 <= R <= 50, 1 <= C <= 50). While good for the grass, ...
分类:
其他好文 时间:
2020-07-24 22:06:12
阅读次数:
92