![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
样例过了就是对
记录一下我的错题之路~
展开
-
二分练习(SDUTOJ2781)
作为一道二分法的模板题,有必要插个眼; 二分练习Description给你一个序列,然后给你m个元素,让你从序列中找出与每个元素最接近的数字输出来,如果有两个就输出两个。 Input 多组输入,第一行给你两个数n(0 < n < 10000000),m(0 < m < n),接下来是数列的n个数,然后再输入m个元素,让你找出最接近每个元素的值。如果有两...原创 2020-04-17 01:28:03 · 234 阅读 · 0 评论 -
顺滑如水VIM
“”"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " 显示相关 “”"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "winpos 5 5 " 设定窗口位置 "set lines=40 columns=155 " 设定窗口大小原创 2020-11-03 10:22:31 · 165 阅读 · 0 评论 -
堆的使用
#include <iostream> #include <bits/stdc++.h> using namespace std; struct cmp{ bool operator()(int &a,int &b){ return a>b;//重载运算符 } }; priority_queue<int,vector<int>,cmp>q;//为min priority_queue<int>q1原创 2020-10-12 23:23:54 · 113 阅读 · 0 评论 -
nth_element用法
引言 今天在做acwing时看到一个不用排序找中位数的实现方法,便是nth_element,于是找到oj第k小数(不是主席树)用了一下,感觉很有用,即使数据加强过也能过。 介绍 nth_element(first,你要的有序的第几个数,end); 举个栗子: 第k小的数(数据加强版)Description现有一个包含n个整数(1<=n<=20000000)的无序序列(保证序列内元素各不相同),输入一个整数k(1<=k<=n),请用较快的方式找出该序列的第k小数并输出。 Input多组原创 2020-10-12 22:57:23 · 2274 阅读 · 1 评论 -
[题解]I - Slow Leak (dij)(floyd) Kattis - slowleak
I - Slow Leak You are an avid cyclist and bike every day between your home and school. Usually, your ride is uneventful and you bike along the shortest path between home and school. After school this afternoon you realized you have a slow leak in your bike原创 2020-09-19 21:08:16 · 506 阅读 · 0 评论 -
Codeforces Round #668 (Div.2) D. Tree Tag(博弈)(dfs)
D. Tree Tag time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Alice and Bob are playing a fun game of tree tag. The game is played on a tree of ????n vertices numbered from 11 to ????n. Recall that a t原创 2020-09-10 20:01:51 · 154 阅读 · 0 评论 -
2020年SDUTACM暑假集训阶段总结
2020年SDUTACM暑假集训阶段总结 9#504软件本1902王硕 一、学习内容–暑假新学了哪些专题,每个专题刷了多少题 (1) kmp算法专题 8道 (2) 二分图 (匈牙利算法-hk算法)13道 (3) 数论 3道(补) (4)字典树 14道 (5)线段树扫描线 4道 (6)树状数组 二、比赛内容总结(2020年7月27日-8月27日个人赛) (1) VJ先伟老师抓的个人赛(div1 or div2 参加场次/总场次)8/9 (2) 比赛中AC多少题(AC题数/总题数)28/93 (3) 比赛后补了原创 2020-08-29 13:42:16 · 216 阅读 · 0 评论