#include<bits/stdc++.h> #define N 300010 using namespace std; #define int long long int h[N],nxt[N],v[N],w[N],s,t,dep[N],ec,p[N],n,a[N],b[N],c[N],f[N] ...
分类:
其他好文 时间:
2021-02-17 14:04:51
阅读次数:
0
未完待续……(只是给自己存个板子) 快速傅里叶变换 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 1e2; struct Cp { double x, y; inline Cp operator +(cons ...
分类:
其他好文 时间:
2021-02-17 14:03:19
阅读次数:
0
A - Favorite Sound #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a, b, c; cin >> a >> b >> ...
分类:
其他好文 时间:
2021-02-16 12:44:42
阅读次数:
0
typedef - 自定义类型 该语句主要用于将某种类型起名为一个别名,如 double 起名为 area,这样以后再定义area类型的变量时,就相当于定义了一个double的变量。 程序实例: 定义一个double 类的 #include <iostream> using namespace st ...
分类:
其他好文 时间:
2021-02-16 12:35:10
阅读次数:
0
// // variadic_template.h// template <typename T>class Enum {public: using Type = T; static const char * toString(T); static T toEnum(const std::strin ...
分类:
其他好文 时间:
2021-02-16 12:24:36
阅读次数:
0
#include<iostream> #include<thread> using namespace std; void func() { cout << "子线程开始了" << endl; cout << "......" << endl; cout << "子线程结束了" << endl; } ...
分类:
编程语言 时间:
2021-02-16 12:12:15
阅读次数:
0
1 #include <iostream> 2 3 using namespace std; 4 5 template <typename K, typename V> 6 class BST 7 { 8 private: 9 struct node // 类内定义类、结构体 10 { 11 K k ...
分类:
其他好文 时间:
2021-02-16 12:09:37
阅读次数:
0
使用namedtuple方法可以代替手动生成一个类 # Why Python is Great: Namedtuples # Using namedtuple is way shorter than # defining a class manually: >>> from collections ...
分类:
编程语言 时间:
2021-02-16 12:02:48
阅读次数:
0
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u ...
分类:
其他好文 时间:
2021-02-15 12:42:07
阅读次数:
0
struct默认成员为public的,class默认成员为private的,此外并没有什么区别 所以用一个结构体给另一个结构体赋值时,一般结构体里如果没有定义赋值运算符,则会像类那样使用默认赋值运算符或默认拷贝构造函数。 1 #include <iostream> 2 3 using namespa ...
分类:
其他好文 时间:
2021-02-15 12:40:35
阅读次数:
0