随笔分类 -  cf

摘要:4240: 有趣的家庭菜园 Description 对家庭菜园有兴趣的JOI君每年在自家的田地中种植一种叫做IOI草的植物。JOI君的田地沿东西方向被划分为N个区域,由西到东标号为1~N。IOI草一共有N株,每个区域种植着一株。在第i个区域种植的IOI草,在春天的时候高度会生长至hi,此后便不再生长 阅读全文
posted @ 2019-02-14 17:58 NKDEWSM 阅读(680) 评论(0) 推荐(0) 编辑
摘要:和51nod1055 一样; #include<iostream> #include<cstdio> #include<algorithm> #include<cstdlib> #include<cstring> #include<string> #include<cmath> #include<m 阅读全文
posted @ 2019-02-14 16:49 NKDEWSM 阅读(376) 评论(0) 推荐(0) 编辑
摘要:Thanos wants to destroy the avengers base, but he needs to destroy the avengers along with their base. Let we represent their base with an array, wher 阅读全文
posted @ 2019-02-10 15:24 NKDEWSM 阅读(305) 评论(0) 推荐(0) 编辑
摘要:A.Slightly Decreasing Permutations Permutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of th 阅读全文
posted @ 2019-02-09 08:24 NKDEWSM 阅读(268) 评论(0) 推荐(0) 编辑
摘要:After the end of the truck drivers' strike, you and the rest of Nlogônia logistics specialists now have the task of planning the refueling of the gas 阅读全文
posted @ 2019-02-05 22:05 NKDEWSM 阅读(224) 评论(0) 推荐(0) 编辑
摘要:Grandpa Giuseppe won a professional pizza cutter, the kind of type reel and, to celebrate, baked a rectangle pizza to his grandchildren! He always sli 阅读全文
posted @ 2019-02-05 21:58 NKDEWSM 阅读(435) 评论(0) 推荐(0) 编辑
摘要:A. Colorful Stones (Simplified Edition) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output 阅读全文
posted @ 2019-02-05 21:54 NKDEWSM 阅读(403) 评论(0) 推荐(0) 编辑
摘要:题意翻译 题目大意: 有n种T恤,每种有价格ci和品质qi。有m个人要买T恤,第i个人有vi元,每人每次都会买一件能买得起的qi最大的T恤。一个人只能买一种T恤一件,所有人之间都是独立的。问最后每个人买了多少件T恤? 题目描述 The big consignment of t-shirts goes 阅读全文
posted @ 2019-02-02 10:52 NKDEWSM 阅读(275) 评论(0) 推荐(0) 编辑
摘要:先二分一个区间,再在区间里面二分即可; 可以仔细想想,想明白很有意思的; 阅读全文
posted @ 2019-01-23 09:57 NKDEWSM 阅读(173) 评论(0) 推荐(0) 编辑
摘要:The UNAL programming coaches have lost a bet, they bet the 6 UNAL teams would occupy the first six positions in the regional finals. Now, they have to 阅读全文
posted @ 2019-01-21 20:25 NKDEWSM 阅读(153) 评论(0) 推荐(0) 编辑
摘要:The UN finals are here!, the coaches/ex-coaches team is creating a new exciting contest to select which teams will compete in the Colombian finals. Iv 阅读全文
posted @ 2019-01-21 20:19 NKDEWSM 阅读(258) 评论(0) 推荐(0) 编辑
摘要:Ignacio is a famous mathematician, some time ago he was married with Dolly, a famous scientific, at that time they bought a huge piece of land that th 阅读全文
posted @ 2019-01-21 20:17 NKDEWSM 阅读(553) 评论(0) 推荐(0) 编辑
摘要:A. Salem and Sticks 题目描述 Salem gave you n n n sticks with integer positive lengths a1,a2,…,an a_1, a_2, \ldots, a_n a1​,a2​,…,an​ . For every stick, y 阅读全文
posted @ 2019-01-21 10:06 NKDEWSM 阅读(166) 评论(0) 推荐(0) 编辑
摘要:最简单的就是变成1~n的序列; 我们可以先加一个极大的数防止出现负数; 然后对于每一个%(a[ i ] - i); 阅读全文
posted @ 2019-01-20 09:56 NKDEWSM 阅读(121) 评论(0) 推荐(0) 编辑
摘要:Three companies decided to order a billboard with pictures of their logos. A billboard is a big square board. A logo of each company is a rectangle of 阅读全文
posted @ 2019-01-20 00:07 NKDEWSM 阅读(552) 评论(0) 推荐(0) 编辑
摘要:Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n different skills, each o 阅读全文
posted @ 2019-01-20 00:06 NKDEWSM 阅读(456) 评论(0) 推荐(0) 编辑
摘要:The capital of Berland has n multifloor buildings. The architect who built up the capital was very creative, so all the houses were built in one row. 阅读全文
posted @ 2019-01-20 00:04 NKDEWSM 阅读(239) 评论(0) 推荐(0) 编辑
摘要:Inzane finally found Zane with a lot of money to spare, so they together decided to establish a country of their own. Ruling a country is not an easy 阅读全文
posted @ 2019-01-17 16:43 NKDEWSM 阅读(318) 评论(0) 推荐(0) 编辑
摘要:Although Inzane successfully found his beloved bone, Zane, his owner, has yet to return. To search for Zane, he would need a lot of money, of which he 阅读全文
posted @ 2019-01-17 16:40 NKDEWSM 阅读(476) 评论(0) 推荐(0) 编辑
摘要:Zane the wizard is going to perform a magic show shuffling the cups. There are n cups, numbered from 1 to n, placed along the x-axis on a table that h 阅读全文
posted @ 2019-01-17 16:31 NKDEWSM 阅读(212) 评论(0) 推荐(0) 编辑