分块就是乱搞(确信 啥是分块 分块本质就是优雅的暴力,通过预处理和根号平衡(玄学地)让复杂度降低 比如我们考虑一个~~线段树裸~~题: 区间加,区间查询,$n 展开查看 cpp include using namespace std; define int long long inline int ...
分类:
其他好文 时间:
2019-12-11 13:11:06
阅读次数:
98
"[SCOI2015]情报传递" 题意大概就是 使得在 $i$ 时刻加入一个情报员帮您传情报 然后询问 $x,y,c$ 指 $x$到$y$多少个人有风险…(大于c)的都有风险…每天风险值+1 看起来…不太可做… 每次要整棵树+1复杂度也需要$log^2$的树套树吧 但是显然不用啊 查询的时候减掉就可 ...
分类:
其他好文 时间:
2019-12-11 00:06:28
阅读次数:
121
1 #include<stdio.h> 2 3 int main(void) 4 { 5 int a[80]; 6 int i; 7 8 i = 0; 9 while ((a[i] = getchar()) != '\n') 10 { 11 i++; 12 } 13 a[i] = '\0'; 14 ...
分类:
其他好文 时间:
2019-12-09 10:25:45
阅读次数:
298
https://codeforces.com/contest/1265 这场的2E是1C的不带checkpoints的版本。 B Beautiful Numbers 题意:给一个数组是一个[1,n]的permutation。对每个m∈[1,n]问[1,m]是否连续存在在这个数组中。 题解: 首先,[ ...
分类:
其他好文 时间:
2019-12-06 11:23:06
阅读次数:
95
1 #include 2 #pragma comment(lib, "WtsApi32.lib") 3 void fun17(int argc, char *argv[]){ 4 ////计算机名 5 //TCHAR szServerName[32] = TEXT("DESKTOP-45J0D6P"... ...
#include<iostream> #include<vector> #include<map> #include<sstream> #include<algorithm> using namespace std; map<string ,vector<string> >title,keyword ...
分类:
其他好文 时间:
2019-12-05 22:18:31
阅读次数:
175
//一个跟hyj巨佬学来的快速读入模板 卡常大佬不愧是卡常大佬 1 bool isdigit(char ch) 2 { 3 if(ch>='0'&&ch<='9') return 1; 4 return 0; 5 } 6 inline void fastin(int &v) 7 { 8 static ...
分类:
其他好文 时间:
2019-12-05 18:30:21
阅读次数:
102
你是否会经常因为TLE而烦恼? 你是否会因为想不出优化而骂自己太蒟? 你是否看到n=10^9就瑟瑟发抖? 拯救你们的神器来了! 它就是…… 读入优化!!!(也叫快读) 上代码! int read() { int f=1,ans=0; char c; c=getchar(); while(c<'0'| ...
分类:
其他好文 时间:
2019-12-04 20:11:31
阅读次数:
75
冒泡排序 1 // ConsoleApplication15.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include"stdlib.h" 6 7 #include"iostream" 8 using namespace std; 9 ...
分类:
编程语言 时间:
2019-12-04 01:35:00
阅读次数:
98