Loading

随笔分类 -  刷题笔记----------

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 25 下一页
摘要:一、内容 You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now g 阅读全文
posted @ 2020-07-26 10:57 RioTian 阅读(142) 评论(0) 推荐(1)
摘要:MPI Maelstrom POJ - 1502 实验室有很多台计算机,由于每个人计算机的性能不同,导致计算机之间发送信息的速度不同,所以花费时间不同。 消息从第一台电脑发送到第二台电脑后,这两台电脑能再向其他电脑发送消息,就是一种类似二叉树的结构。 当然并不是真正的二叉树——我们的计算机有一些特殊 阅读全文
posted @ 2020-07-26 09:46 RioTian 阅读(219) 评论(1) 推荐(0)
摘要:A.Common Subsequence 题意 给你两组数,问你有没有相同 的书,有的话,输出最短的那组(大家都知道,1是最小的) AC #include<bits/stdc++.h> using namespace std; const int N = 1005; int a[N], x, n, 阅读全文
posted @ 2020-07-25 17:36 RioTian 阅读(135) 评论(0) 推荐(1)
摘要:POJ 3259 http://poj.org/problem?id=3259 题意: 农夫 FJ 有 N 块田地【编号 1...n】 (1<=N<=500) 田地间有 M 条路径 【双向】(1<= M ⇐ 2500) 同时有 W 个孔洞,可以回到以前的一个时间点【单向】(1<= W ⇐200) 问 阅读全文
posted @ 2020-07-25 17:29 RioTian 阅读(360) 评论(0) 推荐(1)
摘要:https://codeforces.com/problemset/problem/455/A 题意: 给出n个元素,让我们来挑选,如果选了 \(a_k\),获得$a_k$点数,同时与$a_{k+1} 和 a_{k−1}$相等的元素都要被删除,问选完所有元素后的所能获得的最大点数 解题思路: 首先输 阅读全文
posted @ 2020-07-23 11:10 RioTian 阅读(324) 评论(0) 推荐(1)
摘要:A new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administration wants to launch their project as soon a 阅读全文
posted @ 2020-07-22 15:13 RioTian 阅读(212) 评论(2) 推荐(1)
摘要:Xenia lives in a city that has n houses built along the main ringroad. The ringroad houses are numbered 1 through n in the clockwise order. The ringro 阅读全文
posted @ 2020-07-22 14:44 RioTian 阅读(253) 评论(0) 推荐(0)
摘要:题目链接 Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each r 阅读全文
posted @ 2020-07-21 15:16 RioTian 阅读(265) 评论(0) 推荐(1)
摘要:算年龄 英国数学家德摩根出生于19世纪初叶(即18xx年)。 他年少时便很有才华。一次有人问他的年龄,他回答说: “到了x的平方那年,我刚好是x岁”。 请你计算一下,德摩根到底出生在哪一年。 题中的年龄指的是周岁。 请填写表示他出生年份的四位数字,不要填写任何多余内容。 1806 //手写下 0 - 阅读全文
posted @ 2020-07-21 11:24 RioTian 阅读(192) 评论(0) 推荐(0)
摘要:Codeforces Round #656 (Div. 3)题解 A.Three Pairwise Maximums 解题思路: 依照题意和样例,三个整数x,y,z必须有两个相同且都比第三个数大。 如果x==y则说明a为最大值,此时需要满足a>=z,如果不满足该条件,则无解,因为z=max(b,c) 阅读全文
posted @ 2020-07-20 16:25 RioTian 阅读(180) 评论(0) 推荐(0)
摘要:https://codeforces.com/problemset/problem/489/C C. Given Length and Sum of Digits... You have a positive integer m and a non-negative integer s. Your 阅读全文
posted @ 2020-07-17 20:16 RioTian 阅读(233) 评论(0) 推荐(0)
摘要:试题 A: 平方和 本题总分:5 分 【问题描述】 小明对数位中含有 2、0、1、9 的数字很感兴趣,在 1 到 40 中这样的数包括 1、2、9、10 至 32、39 和 40,共 28 个,他们的和是 574,平方和是 14362。注意,平方和是指将每个数分别平方后求和。 请问,在 1 到 20 阅读全文
posted @ 2020-07-16 09:40 RioTian 阅读(871) 评论(2) 推荐(2)
摘要:A. 每组给一个和个数(),每次操作可以给一个加2,求是否能使n个数相等 4 3 1 1 3 4 1 1 2 1 2 11 11 1 100 YES NO YES YES 直接扫一遍,记录最大值与当前的差是否能被2整除。 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2020-07-14 21:05 RioTian 阅读(182) 评论(0) 推荐(1)
摘要:解题思路 题目说的意思是,给一个2n个数的数组,注意n为奇数,将这个数组平均分为2份,假设为c1和c2。 c1和c2是奇数个元素的数组,比如数组[1,2,3],那么中位数就是2。 那么如何求得中位数差值最小的两个数组呢? 对于数组[1, 2, 3, 4, 5, 6],显然只要一个数组的中位数是3,另 阅读全文
posted @ 2020-07-14 20:02 RioTian 阅读(167) 评论(0) 推荐(1)
摘要:题意:不同奶茶店里同样的奶茶价格不同,问在当天Yuki持有的零钱能在几家店购买 思路:对价格数组排序,先优先判断是否会比较最大值和最小值,然后二分查找 #include<bits/stdc++.h> using namespace std; int main() { int n, q, m, a[1 阅读全文
posted @ 2020-07-14 19:14 RioTian 阅读(164) 评论(0) 推荐(0)
摘要:A Ministry for Defense sent a general to inspect the Super Secret Military Squad under the command of the Colonel SuperDuper. Having learned the news, 阅读全文
posted @ 2020-06-30 21:22 RioTian 阅读(170) 评论(0) 推荐(0)
摘要:记第一场CF赛,完成3道题 代码更新(降低时间复杂度和修改写法):21.1.23 A题 Required Remainder 题意:给你 x、y、n 求最大的k (k<=n) 使得k%x==y **做法:模拟 ** 寻找最大整除数,一开始while循环找,直接TLE2 #include<bits/s 阅读全文
posted @ 2020-06-29 20:32 RioTian 阅读(243) 评论(0) 推荐(1)
摘要:https://codeforces.com/contest/1360/problem/C We call two numbers xx and yy similar if they have the same parity (the same remainder when divided by 2 阅读全文
posted @ 2020-06-28 22:11 RioTian 阅读(435) 评论(0) 推荐(1)
摘要:7 4 2 4 1 4 3 4 统计技能种类数量 4种不同技能 统计同一技能最大数量 技能1(数量1) 技能2(数量1) 技能3(数量1) 技能4(数量4) 选出 技能4(数量4) 作为 第2组 扣除技能4,还有4-1=3种不同技能 作为 第1组 发现,第2组数量4,第1组数量3 输出结果为3 5 阅读全文
posted @ 2020-06-28 21:39 RioTian 阅读(162) 评论(0) 推荐(1)
摘要:There is a game called "I Wanna Be the Guy", consisting of n levels. Little X and his friend Little Y are addicted to the game. Each of them wants to 阅读全文
posted @ 2020-06-27 21:32 RioTian 阅读(481) 评论(0) 推荐(1)

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 25 下一页