ABC 148 第一次打abc,记录一下 Task Name Time Limit Memory Limit A Round One 2 sec 1024 MB B Strings with the Same Length 2 sec 1024 MB C Snack 2 sec 1024 MB D Brick Break 2 sec 1024 MB E Double Factorial 2 sec 1024 MB F Playing Tag on Tree 2 sec 1024 MB 6/6,r…
目录 AtCoder Beginner Contest 148 题解 前言 A - Round One 题意 做法 程序 B - Strings with the Same Length 题意 做法 程序 C - Snack 题意 做法 程序 D - Brick Break 题意 做法 程序 E - Double Factorial 题意 做法 程序 F - Playing Tag on Tree 题意 做法 程序 结束语 AtCoder Beginner Contest 148 题解 前言 包…
4353: Play with tree Time Limit: 20 Sec Memory Limit: 256 MBSubmit: 31 Solved: 19[Submit][Status][Discuss] Description 给你一棵包含N个节点的树,设每条边一开始的边权为0,现在有两种操作: 1)给出参数U,V,C,表示把U与V之间的路径上的边权变成C(保证C≥0) 2)给出参数U,V,C,表示把U与V之间的路径上的边权加上C.但是如果U至V之间路径某条边的边权加上C小于0,那…
Description You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each edge is associated with a weight. Then you are to execute a series of instructions on the tree. The instructions…
G. The Tree time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Abendsen assigned a mission to Juliana. In this mission, Juliana has a rooted tree with nn vertices. Vertex number 11 is the roo…
C. Sasha and Array time limit per test:5 seconds memory limit per test:256 megabytes input:standard input output: standard output Sasha has an array of integers a1, a2, ..., an. You have to perform m queries. There might be queries of two types: 1 l…
F. Heroes of Making Magic III time limit per test:3 seconds memory limit per test:256 megabytes input:standard input output:standard output I’m strolling on sunshine, yeah-ah! And doesn’t it feel good! Well, it certainly feels good for our Heroes of…