HYNB Round 15: PKU Campus 2019

HYNB Round 15: PKU Campus 2019


C. Parade

题意 将平面上n*2个点安排在长度为n的两行上。

做法

  • 首先可以忽略每个点之间的影响,只用考虑匹配即可
  • 然后把所以点归约到两行上,再从左到右依次考虑即可(考虑每条分界线被经过多少次)
  • 比赛时被贪心治了...

G. Go and Oreo

题意 把n*n个格子黑白染色后,数奥利奥

做法

  • 按格考虑,简易版轮廓线DP
  • 赛中一直在按行考虑,然后就不会了


HYNB Round 15: PKU Campus 2019

原文地址:https://www.cnblogs.com/FST-stay-night/p/11620799.html

时间: 2024-10-10 09:09:04

HYNB Round 15: PKU Campus 2019的相关文章

BestCoder Round#15 1001-Love

http://acm.hdu.edu.cn/showproblem.php?pid=5082 Love Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 64    Accepted Submission(s): 51 Problem Description There is a Love country with many couples

PJOI PKU Campus 2011 B:A Problem about Tree LCA 求任意点x为根的y的父节点

题目链接:点击打开链接 题意:给定n个点 m个询问 下面n-1行给定一棵树 m个询问 x y 问把树转成以x为根 y的父节点是谁 第一种情况lca==y那就是x的第 dep[x] - dep[y] -1 父亲,依次向上爬山坡,利用倍增的二进制加速. 第二种就是Father[y]; #include"cstdio" #include"iostream" #include"queue" #include"algorithm" #i

BestCoder Round#15 1002-Instruction

http://acm.hdu.edu.cn/showproblem.php?pid=5083 官方题解——> 1002 Instruction 先考虑编码,首先找到operation对应的编码,如果是SET就找后面的一个R后面跟着的数字a,令b=0,否则找后面第一个R后面的数字当作a,第二个R后面的数字当作b,最后依次输出operation二进制编码,a, b的二进制编码. 再说解码,先将前6位,中间5位和后面5位转化成十进制记为oid, a, b.如果oid<1||oid>6就是Err

Codeforces Educational Codeforces Round 15 C. Cellular Network

C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n points on the straight line — the positions (x-coordinates) of the cities and m points on the same line

PKU Campus 2016 H: Magical Balls

H: Magical Balls 总Time Limit: 1000ms Memory Limit: 262144kB Description Wenwen has a magical ball. When put on an infinite plane, it will keep duplicating itself forever. Initially, Wenwen puts the ball on the location (x0, y0) of the plane. Then the

hdu 5083 Instruction(Bestcoder Round #15)

Instruction                                                               Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 327    Accepted Submission(s): 94 Problem Description Nowadays, Jim Gre

Educational Round 15

A题Maximum Increase 大水题.最长连续递增子序列有多长. 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 int main() 5 { 6 int n, a, rec = 0, len = 0, ans = 1; 7 scanf("%d",&n); 8 for(int i = 0; i < n; i++) 9 { 10 scanf("%

Educational Codeforces Round 15 - ABC

A. Maximum Increase 题意:找 最长的 连续的严格上升的子序列,输出它的长度. 解题: 因为要求连续,所以一边扫一遍统计就可以.事后觉得我写的麻烦了些o(╯□╰)o. #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #include<string> using namespace std; int a[100010]; int m

hdu 5082 Love(Bestcoder Round #15)

Love Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 78    Accepted Submission(s): 57 Problem Description There is a Love country with many couples of Darby and Joan in it. In order to commemor