#include <bits/stdc++.h> using namespace std; stack<char> stack_op; stack<int> stack_num; char str[10000]; string change; int pow(int x, int y) { int ...
分类:
其他好文 时间:
2020-10-06 20:08:42
阅读次数:
25
#include <iostream> #include <string> #define MAX 500 using namespace std; struct person { string name; int age; }; struct contact { person persons[MA ...
分类:
编程语言 时间:
2020-10-05 22:33:17
阅读次数:
48
实践题目名称:最大子列和问题 问题描述:给定K个整数组成的序列{ N?1??, N?2??, ..., N?K?? },“连续子列”被定义为{ N?i??, N?i+1??, ..., N?j?? },其中 1≤i≤j≤K。“最大子列和”则被定义为所有连续子列元素的和中最大者。 #include < ...
分类:
编程语言 时间:
2020-10-05 22:18:57
阅读次数:
28
查询回文子串个数: #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<double,int> pii; const int N = 3e5+5; const int M = 1e6+5; c ...
分类:
其他好文 时间:
2020-10-05 22:16:55
阅读次数:
30
整理了以下要点:1.#include<stdio.h>//调用原函数库2.intmain()//整型主函数(有且仅有一个)3.printf//打印函数,包含于原函数库中scanf//输入函数4.%d打印整型%c打印字符%f打印浮点数字%p以地址的形式打印%x打印16进制%o...5.chars:1字符数据类型shorts:2短整型ints:4整型longs:4/8长整型longlong
分类:
编程语言 时间:
2020-10-05 22:02:46
阅读次数:
32
题意 树的层序遍历的问题,找到结点数最多的一层,输出结点树和对应层号 思路 看到是树层序遍历就立马反应过来用BFS做,可以说是裸模版的题目了 层序遍历在每次扩展状态的时候都是取一层的结点数进行扩展,此时就可以直接比较来找题目要求的解了 代码 #include <algorithm> #include ...
分类:
其他好文 时间:
2020-10-05 21:55:34
阅读次数:
27
2020.10.02 学字典树几天了,但还是做不出什么题目。但好歹能看懂别人的代码,这么弱的我只能靠这样来一点点进步了。 国庆在家写代码的节奏也放慢了,没有学校里机房里效率高。虽然平时机房里也没几个人。 虽然我真的很弱,但我真心希望自己和身边的人都能够变强,能一起努力,一起在机房熬夜。或许这样我才能 ...
分类:
其他好文 时间:
2020-10-05 21:52:27
阅读次数:
18
#include<bits/stdc++.h> using namespace std; const int N = 300010; vector<int>p[N]; int ans[N]; int main() { int t; scanf("%d",&t); while(t --) { int ...
分类:
其他好文 时间:
2020-10-05 21:46:03
阅读次数:
23
函数:1:库函数-C语言自己提供给我们的strcpy:字符串拷贝,对应#include<string.h>的头文件包括里面的\n,也要被拷贝进去#define_CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<string.h>intmain(){chararr[]={"你是猪"};chararr
分类:
其他好文 时间:
2020-10-05 21:44:51
阅读次数:
22
让我们先把没学完的IDFT放在这里 #include <stdio.h> #include <algorithm> #include <cstring> const int maxn=200000; typedef std:complex<double> com;//typedef 真实放前 def ...
分类:
其他好文 时间:
2020-09-24 21:58:31
阅读次数:
37