2017-2018 ACM-ICPC, Asia Tsukuba Regional Contest

地址

Rank Solved A B C D E F G H I J K
16/160 27/130 O O O . O O ? . O . ?

O: 当场通过

?: 赛后通过

.: 尚未通过

A Secret of Chocolate Poles

solved by chelly



chelly‘s solution

B Parallel Lines

solved by ch



ch‘s solution

C Medical Checkup

solved by chelly



chelly‘s solution

D Digital Clock

unsolved


E Black or White

solved by chelly&ch



chelly‘s solution

F Pizza Delivery

solved by chelly&ch



chelly‘s solution

G Rendezvous on a Tetrahedron

upsolved by feynman



feynman‘s solution

H Homework

unsolved


I Starting a Scenic Railroad Service

solved by chelly



chelly‘s solution

J String Puzzle

unsolved


K Counting Cycles

upsolved by chelly



chelly‘s solution

先求出一棵生成树,那么非树边顶多16条,二进制枚举所有的组合,算经过某几条非树边是否存在一个环(如果存在则一定是唯一的)

对于如何判断,只需要将一个非树边对应的树上的链全部异或一下,那么对于这组选择,选出边权为1的边组成一个图,判断这个图是不是一个简单环即可

注意原树会很大,\(2^16\)次遍历原树是会TLE,我们只需要在虚树上做即可

Dirt Replay

F -1 双连通分量的板子抄错了

E -3 一发是dp式子写错了,还有两发是因为单调队列优化时候的单调队列方向写反了

原文地址:https://www.cnblogs.com/Amadeus/p/10115436.html

时间: 2024-10-31 15:18:05

2017-2018 ACM-ICPC, Asia Tsukuba Regional Contest的相关文章

2018-2019, ICPC, Asia Yokohama Regional Contest 2018 (Gym - 102082)

2018-2019, ICPC, Asia Yokohama Regional Contest 2018 A - Digits Are Not Just Characters 签到. B - Arithmetic Progressions 题意:从给定的集合中选出最多的数构成等差数列. 题解:数字排序后,设\(dp[i][j]\)表示等差数列最后一个数字为\(a[i]\),倒数第二个数字为\(a[j]\)的最大个数.然后对于每一位枚举 \(i\),\(lower\_bound()\)找有无合法的

ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków

ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków Problem A: Rubik's RectangleProblem B: What does the fox say?Problem C: Magical GCDProblem D: SubwayProblem E: EscapeProblem F: DraughtsProblem G: History courseProblem H: C

2018 ICPC Asia Jakarta Regional Contest

题目传送门 题号 A B C D E F G H I J K L 状态 Ο . . Ο . . . . Ο . . Ο Ο:当场 Ø:已补 .  :  待补 A. Edit Distance Thinking:kk pai爷 Code:kk 不能直接反转,比如"010101",直接反转后就变成"101010",右移一位,然后加个0就可以了. 所以要先统计01的数量,如果0大于1,就全变成1,1大于0,就全变成0(从数量上的改变就大于s/2了),相等的话,就看首位是0

2019-2020 ICPC, Asia Jakarta Regional Contest H. Twin Buildings

As you might already know, space has always been a problem in ICPC Jakarta. To cope with this, ICPC Jakarta is planning to build two new buildings. These buildings should have a shape of a rectangle of the same size. Now, their problem is to find lan

(好题)2017-2018 ACM-ICPC, Asia Tsukuba Regional Contest F Pizza Delivery

题意:给n个点m条边的有向图.每次使一条边反向,问你1到2的最短路变短,变长,还是不变. 解法:遇到这种题容易想到正向求一遍最短路d1,反向再求一遍最短路d2.纪录原图上的最短路为ans,然后分开考虑各种情况. 变短的情况:d1[y[i]]+d2[x[i]]+z[i]<ans 否则就剩下不变和变长两种情况:那么如果边(x,y)是起点到终点的最短路必须边的话,就会变长,否则会不变. 接下来的问题是  怎么求最短路的必经边? 求出原图1到2最短路图(这里要和求单源点的最短路图区别开来,单源点的最短路

2019-2020 ICPC, Asia Jakarta Regional Contest C. Even Path

Pathfinding is a task of finding a route between two points. It often appears in many problems. For example, in a GPS navigation software where a driver can query for a suggested route, or in a robot motion planning where it should find a valid seque

hdu6206 Apple 2017 ACM/ICPC Asia Regional Qingdao Online

地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6206 题目: Apple Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 530    Accepted Submission(s): 172 Problem Description Apple is Taotao's favouri

2017 ACM/ICPC Asia Regional Shenyang Online spfa+最长路

transaction transaction transaction Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 1496    Accepted Submission(s): 723 Problem Description Kelukin is a businessman. Every day, he travels arou

2014 ACM/ICPC Asia Regional Guangzhou Online Wang Xifeng&#39;s Little Plot HDU5024

一道好枚举+模拟题目.转换思维视角 这道题是我做的,规模不大N<=100,以为正常DFS搜索,于是傻乎乎的写了起来.各种条件限制模拟过程 但仔细一分析发现对每个点进行全部八个方向的遍历100X100X100^8 .100X100个点,每个点在走的时候8中选择,TLE 于是改为另一个角度: 以符合要求的点为拐弯点,朝两个垂直的方向走,求出最远的距离.这样只要对每个点各个方向的长度知道,组合一下对应的就OK. 避免了每个点深搜. PS:搜索的时候x,y写反了,导致构图出现问题,以后用[dy][dx]