随笔分类 - 基础---暴力
摘要:题目:https://pintia.cn/problem-sets/994805342720868352/problems/994805344776077312 题意: 有m对朋友关系,每个人用4为数字的编号表示,如果是负数表示这是女生。 给定k个查询,对于要查的人a和b,问有多少对朋友(c,d)使
阅读全文
摘要:题目描述 给一n×nn \times nn×n的字母方阵,内可能蕴含多个“yizhong”单词。单词在方阵中是沿着同一方向连续摆放的。摆放可沿着 888 个方向的任一方向,同一单词摆放时不再改变方向,单词与单词之间可以交叉,因此有可能共用字母。输出时,将不是单词的字母用*代替,以突出显示单词。例如:
阅读全文
摘要:题意: 有三个二次函数,分别是$x^2 + a_1x + b_1$, $x^2 + a_2x + b_2$, $x^2 + a_3x + b_3$ 现在要找三个整数$x_1, x_2, x_3$, 使得三个函数值中至少有两个相等。 思路: 主要的难点是要找三个整数。 Camp时候洪老师说的平移啥啥的
阅读全文
摘要:Wow! Such Doge! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3816 Accepted Submission(s): 2254
阅读全文
摘要:Corporate Identity Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3308 Accepted Submission(s): 1
阅读全文
摘要:Blue Jeans Time Limit: 1000MS Memory Limit: 65536K Total Submissions:21746 Accepted: 9653 Description The Genographic Project is a research partnershi
阅读全文
摘要:题面pdfhttps://codeforc.es/gym/101889/attachments/download/7471/statements-2017-latam-regional.pdf zyn感冒,两个人打。刚开始两题超迅速,40分钟后开始各种写不出,自闭。然后突然又开出两题。 4题全部1A
阅读全文
摘要:A The King's Race http://codeforces.com/contest/1075/problem/A 题意: 一个人在\((1,1)\), 一个人在\((n,n)\), 现在他们每次轮流走一步,问谁先到达\((x,y)\) 思路: 每个人走到\((x,y)\)的步数是可以直接
阅读全文
摘要:The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the s
阅读全文
摘要:P1055 ISBN号码 https://www.luogu.org/problemnew/show/P1055 题意:一个ISBN号码形如x-xxx-xxxxx-c,将ISBN号码中的前九个数字按顺序分别乘上1,2,3,...,9之后相加取模11得到c。问给出的c是否合法,若不合法输出合法的ISB
阅读全文
摘要:A golden plate http://codeforces.com/contest/1072/problem/A 题意:给一个n*m的格子,从最外层往里涂色,每次尽量涂最外面的那一圈,两圈涂色之间要间隔一格。问最多涂多少颜色。 思路:最外面一圈是2*n + 2(m - 2),然后行和列都减4就
阅读全文
摘要:1301 邻值查找 0x10「基本数据结构」例题 描述 给定一个长度为 n 的序列 A,A 中的数各不相同。对于 A 中的每一个数 A_i,求:min(1≤j<i) |A_i-A_j|以及令上式取到最小值的 j(记为 P_i)。若最小值点不唯一,则选择使 A_j 较小的那个。 输入格式 第一行一个
阅读全文
摘要:I-Little Boxes【大数】 hdu6225 http://acm.hdu.edu.cn/showproblem.php?pid=6225 题意: 就是给四个大数,输出和。 思路: java大法好。用long longWA了一发 1 import java.math.BigInteger;
阅读全文
摘要:BaoBao and DreamGrid are playing a game using a strange button. This button is attached to an LED light (the light is initially off), a counter and a
阅读全文
摘要:Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat video. To do this, he extracts cat f
阅读全文
摘要:54.19% 2000ms 262144K Morgana is playing a game called cacti lottery. In this game, morgana has a 3 \times 33×3 grid graph, and the graph is filled wi
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/145/C来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288KSpecial Judge, 64bit IO Format: ...
阅读全文