E. Dasha and Puzzle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Dasha decided to have a rest after solving the problem. She had been ready to start her favourite activity — origami, bu…
E. Dasha and Puzzle 题目连接: http://codeforces.com/contest/761/problem/E Description Dasha decided to have a rest after solving the problem. She had been ready to start her favourite activity - origami, but remembered the puzzle that she could not solve…
E. Dasha and Puzzle time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Dasha decided to have a rest after solving the problem. She had been ready to start her favourite activity — origami, bu…
http://codeforces.com/contest/761/problem/E 题意:给出一棵树,现在要把这棵树上的结点放置在笛卡尔坐标上,使得每一条边与x轴平行或者与y轴平行.输出可行解,即每个点放置的坐标. 思路: 一开始我想,这个每条边的边长都是可长可短的,好像很麻烦啊. 做法还是很巧妙的,因为最多也就30个点,所以我们直接让该点连接的边未len长度,然后dfs它的子节点并使它的子节点的边长为len/2.你会发现,这样线段就不会相交了. #include<iostream> #i…
D. Dasha and Very Difficult Problem 题目连接: http://codeforces.com/contest/761/problem/D Description Dasha logged into the system and began to solve problems. One of them is as follows: Given two sequences a and b of length n each you need to write a se…
C. Dasha and Password 题目连接: http://codeforces.com/contest/761/problem/C Description After overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n which satisfies the follo…
B. Dasha and friends 题目连接: http://codeforces.com/contest/761/problem/B Description Running with barriers on the circle track is very popular in the country where Dasha lives, so no wonder that on her way to classes she saw the following situation: Th…
A. Dasha and Stairs 题目连接: http://codeforces.com/contest/761/problem/A Description On her way to programming school tiger Dasha faced her first test - a huge staircase! The steps were numbered from one to infinity. As we know, tigers are very fond of…
题目链接:http://codeforces.com/contest/761/problem/D D. Dasha and Very Difficult Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Dasha logged into the system and began to solve problem…
题目链接:http://codeforces.com/problemset/problem/761/C C. Dasha and Password time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output After overcoming the stairs Dasha came to classes. She needed to w…