Codeforces 难得有一次不熬夜的比赛。 A 送分题,记得开 long long。 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; #define in ...
分类:
其他好文 时间:
2021-02-24 13:20:53
阅读次数:
0
stl本身内部定义了一些常用的函数对象,我们需要的时候直接使用就可以了,不用再自己定义类。 需要引入头文件#include <functional> 例:使用内置的取反函数对象,其他内置函数对象的使用类似 #include <fuctional> void main(){ negate<int> n ...
分类:
其他好文 时间:
2021-02-24 13:16:22
阅读次数:
0
A - Circle #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int r; int main(){ cin >> r; cout << r * r << end ...
分类:
其他好文 时间:
2021-02-24 13:15:50
阅读次数:
0
B : 三明治 2021-01-17 14:25:53 #include<stdio.h> #include<string.h>//memset(void *s, int v, size_t n)函数的头文件 #include<limits.h>//INT_MAX的头文件 INT_MAX=21474 ...
分类:
其他好文 时间:
2021-02-24 12:53:30
阅读次数:
0
给定 N,求有多少 a,b,c 满足 $a \le b \le c \le n, a^2 + b^2 = c^2, a^2 - b = c$ ...
分类:
其他好文 时间:
2021-02-23 14:31:13
阅读次数:
0
原题链接 题意 给我们一个长为n的序列A以及一个整数c,对这个序列的任何一个连续区间[l, r],我们可以给这个区间内的数统一加上一个我们任取的整数k。 要求我们只能做上述操作一次,问最终序列内最多有多少个c 思路 首先这个序列里面可能本来就有一些c,我们定义$cnt[i]$为前i个数内的c的个数 ...
分类:
其他好文 时间:
2021-02-23 14:17:02
阅读次数:
0
创建型-单例模式 class SingletonOne { private static $singletonOne = null; public function ok() { echo 'ok'; } public static function getInstance(){ if (self: ...
分类:
Web程序 时间:
2021-02-23 14:14:02
阅读次数:
0
题意:有4种菜,每种菜有n1,n2,n3,n4个,每个菜有一个价格。 需要你每种菜选1个,问最小价格。但1和2、2和3、3和4之间有些菜有1对1的互斥关系,如果有互斥则不能选。 做法:把每两组贪心线性预处理,最后合并即可 #include<bits/stdc++.h> using namespace ...
分类:
其他好文 时间:
2021-02-23 14:09:14
阅读次数:
0
百度网盘下载地址(964):点击下载 ? #include <reg52.h> #define uchar unsigned char #define uint unsigned int #include <intrins.h> /* 数码管段选定义 0 1 2 3 4 5 6 7 8 9 */ u ...
分类:
其他好文 时间:
2021-02-23 13:58:44
阅读次数:
0
冗余路径 \(\href{https://www.acwing.com/solution/content/20697/}{边连通分量}\) \(本题是等价于加入最少边是整个图变成边连通分量(没有桥)\) #include <bits/stdc++.h> using namespace std; #d ...
分类:
其他好文 时间:
2021-02-22 12:51:09
阅读次数:
0