摘要: 问题 E: Plug It In! 题目描述 Adam just moved into his new apartment and simply placed everything into it at random. This means in particular that he did not 阅读全文
posted @ 2019-08-23 10:18 sylvia11 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Pants On Fire 题目描述 Donald and Mike are the leaders of the free world and haven’t yet (after half a year) managed to start a nuclear war. It is so grea 阅读全文
posted @ 2019-08-18 16:16 sylvia11 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 手环定理 : 一个手环是由n个珠子构成,有k种颜色,每个珠子可以染成这k种颜色中的任意一种,求可以染出多少种本质上不相同的手环来(这里需要考虑手环旋转后仍是同一种手环); 定理公式为: 方案数:L = inv(G)* ( k^c[0] + k^c[1] + ........ + k^c [ G-1 阅读全文
posted @ 2019-08-18 15:53 sylvia11 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 题目如下: 来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Fo 阅读全文
posted @ 2019-08-16 10:12 sylvia11 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 头文件: #include <cmath> 一、ceil函数 朝上取整。 ceil(-3.14) = -3;ceil(4.56) = 5; 返回大于或者等于指定表达式的最小整数 二、floor函数 朝下取整。 floor(-3.14) = -4;floor(4.56) = 4;三、floor函数 朝 阅读全文
posted @ 2019-08-15 09:54 sylvia11 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 问题 J: Degree Sequence of Graph G 题目描述 Wang Haiyang is a strong and optimistic Chinese youngster. Although born and brought up in the northern inland c 阅读全文
posted @ 2019-08-07 20:38 sylvia11 阅读(386) 评论(1) 推荐(0) 编辑
摘要: 思想:采用贪心的思想。 通过SPFA,增广路的思想,每次找到一条从源点到达汇点的花费最小的路径 增加流量,直到无法找到一条从源点到达汇点的路径,算法结束。 每次找一条花费最小的路径,从源点跑到汇点,然后维护这条路上所加的流量最小值(addflow函数),然后总流量加上流量。最后再回溯,将正向边减去, 阅读全文
posted @ 2019-08-07 20:06 sylvia11 阅读(249) 评论(1) 推荐(0) 编辑
摘要: 1 Java大数 2 import java.util.*; 3 import java.math.*; 4 public class Main{ 5 public static void main(String args[]){ 6 Scanner cin = new Scanner(System.in); 7 BigIntege... 阅读全文
posted @ 2019-08-03 20:27 sylvia11 阅读(620) 评论(0) 推荐(0) 编辑
摘要: Give Candies 题目描述 There are N children in kindergarten. Miss Li bought them N candies。To make the process more interesting, Miss Li comes up with the 阅读全文
posted @ 2019-08-02 14:33 sylvia11 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目描述 You are given a picture consisting of n rows and m columns. Rows are numbered from 1 to n from the top to the bottom, columns are numbered from 1 阅读全文
posted @ 2019-07-31 10:01 sylvia11 阅读(147) 评论(1) 推荐(0) 编辑