摘要: Given a big integer number, you are required to find out whether it's a prime number. Input The first line contains the number of test cases T (1 <= T 阅读全文
posted @ 2019-10-12 15:37 Ellery_lrh 阅读(94) 评论(0) 推荐(0)
摘要: // // Name : HDU3864.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style // #include <iostream> #include <stdio.h> #include <stdlib.h> #in 阅读全文
posted @ 2019-10-12 15:23 Ellery_lrh 阅读(122) 评论(0) 推荐(0)
摘要: 1002 Game (贪心模拟)Accepts: 572 Submissions: 6218 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 度度 阅读全文
posted @ 2019-10-09 22:58 Ellery_lrh 阅读(147) 评论(0) 推荐(0)
摘要: Snacks Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 7726 Accepted Submission(s): 1681 Problem 阅读全文
posted @ 2019-10-09 00:17 Ellery_lrh 阅读(155) 评论(0) 推荐(0)
摘要: C. Primes and Multiplication time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Primes an 阅读全文
posted @ 2019-10-06 18:41 Ellery_lrh 阅读(207) 评论(0) 推荐(0)
摘要: 毛毛虫经过及时的变形,最终逃过的一劫,离开了菜妈的菜园。 毛毛虫经过千山万水,历尽千辛万苦,最后来到了小小的绍兴一中的校园里。 爬啊爬~爬啊爬毛毛虫爬到了一颗小小的“毛景树”下面,发现树上长着他最爱吃的毛毛果~ “毛景树”上有N个节点和N-1条树枝,但节点上是没有毛毛果的,毛毛果都是长在树枝上的。但 阅读全文
posted @ 2019-09-27 16:27 Ellery_lrh 阅读(149) 评论(2) 推荐(0)
摘要: output standard output output standard output output Mad scientist Mike has constructed a rooted tree, which consists of n vertices. Each vertex is a 阅读全文
posted @ 2019-09-26 01:04 Ellery_lrh 阅读(298) 评论(0) 推荐(0)
摘要: 如题,已知一棵包含N个结点的树(连通且无环),每个节点上包含一个数值,需要支持以下操作: 操作1: 格式: 1 x y z 表示将树从x到y结点最短路径上所有节点的值都加上z 操作2: 格式: 2 x y 表示求树从x到y结点最短路径上所有节点的值之和 操作3: 格式: 3 x z 表示将以x为根节 阅读全文
posted @ 2019-09-25 22:51 Ellery_lrh 阅读(153) 评论(0) 推荐(0)
摘要: A tree is a connected graph that doesn't contain any cycles.The distance between two vertices of a tree is the length (in edges) of the shortest path 阅读全文
posted @ 2019-09-25 19:36 Ellery_lrh 阅读(241) 评论(0) 推荐(0)