摘要: (蒟蒻首次NOIP祭) Day -1 最近没怎么做题了,刚刚总结了一下常用的模板,希望对自己的NOIP有所帮助。 然后等一下打算学一下对拍,据说很重要,然后就是打一打暴力,熟悉一下写法。 最近有点小感冒,希望不会影响比赛的发挥。 今天先占个坑,之后NOIP了再写(不会被禁赛吧(害怕)) Day 0 阅读全文
posted @ 2018-11-08 19:53 bryce02 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 1.线段树 #include <bits/stdc++.h> using namespace std; int n,p,a,b,m,x,y,ans; struct node{ int l,r,w,f; }tree[100005]; void build(int l,int r,int o){ tre 阅读全文
posted @ 2018-11-08 19:48 bryce02 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1.求最大公约数 2.扩展欧几里得 3.线性筛素数 void prime(){ for(int i = 0;i <= n;i++) is_prime[i] = 1; is_prime[0] = 0;is_prime[1] = 0; for(int i = 2;i <= n;i++){ if(is_p 阅读全文
posted @ 2018-11-08 19:37 bryce02 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1.最短路 图全为正权使用Dijkstra,有负权用SPFA,Bellman-Ford稍加了解即可 void spfa(){ queue<int> q; for(int i = 1;i <= n;i++) d[i] = 0x7fffffff; q.push(s);vis[s] = 1;d[s] = 阅读全文
posted @ 2018-11-08 19:20 bryce02 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Sylvia 是一个热爱学习的女孩子。 前段时间,Sylvia 参加了学校的军训。众所周知,军训的时候需要站方阵。 Sylvia 所在的方阵中有n×m名学生,方阵的行数为 n,列数为 m。 为了便于管理,教官在训练开始时,按照从前到后,从左到右的顺序给方阵中 的学生从 1 到 n×m 编上 阅读全文
posted @ 2018-11-08 15:54 bryce02 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Description During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a 阅读全文
posted @ 2018-11-08 10:20 bryce02 阅读(146) 评论(0) 推荐(0) 编辑
Live2D