#include <stdio.h> #include <stdlib.h> typedef struct node {int x; struct node *next; }NODE; NODE *padd(NODE *pa) { NODE *p1,*p2,*p; p1=p2=pa; while(p ...
分类:
其他好文 时间:
2020-11-10 11:42:48
阅读次数:
24
LeetCode 973 最接近原点的K个点 https://leetcode-cn.com/problems/k-closest-points-to-origin/ ? 这个题目比较简单,本质上是一个排序题。先把最简单的快速排序给安排上。 struct Point { int x; int y; ...
分类:
其他好文 时间:
2020-11-10 11:15:37
阅读次数:
7
题目 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NU ...
分类:
其他好文 时间:
2020-11-10 10:47:27
阅读次数:
5
前言春节来临之际,祝大家新年快乐哈。整理了Java枚举的相关知识,算是比较基础的,希望大家一起学习进步。一、枚举类型是什么?JDK5引入了一种新特性,关键字enum可以将一组具名的值的有限集合创建为一种新的类型,而这些具名的值可以作为常规的程序组件使用,这就是枚举类型。一个枚举的简单例子enumSeasonEnum{SPRING,SUMMER,FALL,WINTER;}二、枚举类的常用方法Enum
分类:
编程语言 时间:
2020-11-08 17:38:18
阅读次数:
26
题目大意 一只青蛙现在在一个数轴上,它现在要从点 $1$ 跳到点 \(n\) ,它每次可以向右跳不超过 \(d\) 个单位。比如,它可以从点 \(x\) 跳到点 \(x+a\)($1\le a\le d$) 。 特别的,青蛙只能在有百合花的点上停留。保证点 $1$ 和点 \(n\) 之间有一些点有百 ...
分类:
其他好文 时间:
2020-11-08 17:15:30
阅读次数:
19
#include<iostream> #include<memory.h> #include<cmath> #include<algorithm> using namespace std; typedef struct { int x, y; }node; node d[6000]; int r, ...
分类:
其他好文 时间:
2020-11-08 17:11:46
阅读次数:
15
#include #include <string.h> #define size 10 using namespace std; //含有一个二元算数式的三个值 typedef struct{ float x = 0,y = 0; //x,y为给定的随机数 float r = 0; //r为算数式 ...
分类:
其他好文 时间:
2020-11-08 17:05:55
阅读次数:
19
强联通分量及缩点 #include<bits/stdc++.h> #define re register #define v e[i].to using namespace std; const int lzw=1e4+3; int n,m,head[lzw],tot,h[lzw],cnt,dfn[ ...
分类:
其他好文 时间:
2020-11-06 01:55:25
阅读次数:
17
由于 Cglib 本身的设计,无法实现在 Proxy 外面再包装一层 Proxy(JDK Proxy 可以),通常会报如下错误: Caused by: java.lang.ClassFormatError: Duplicate method name "newInstance" with signa ...
分类:
其他好文 时间:
2020-11-06 01:39:55
阅读次数:
26
#include <iostream> #include <vector> #include <stack> #include <queue> template <class T> typedef struct node { node* left; node* right; T val; std:: ...
分类:
其他好文 时间:
2020-11-06 01:25:12
阅读次数:
16