Description: The elderly aunts always like to look for bargains and preferential merchandise. Now there is a shop carrying out group purchase promotion. Rules are as follows : There are r pieces of promotional items, and each item is only one. In the…
2018 ACM-ICPC 中国大学生程序设计竞赛线上赛:https://www.jisuanke.com/contest/1227 题目链接:https://nanti.jisuanke.com/t/26219 Rock Paper Scissors Lizard Spock Description: Didi is a curious baby. One day, she finds a curious game, which named Rock Paper Scissors Lizard…
2018 ACM-ICPC 中国大学生程序设计竞赛线上赛:https://www.jisuanke.com/contest/1227 题目链接:https://nanti.jisuanke.com/t/26172 Clever King Description: In order to increase the happiness index of people's lives, King Y has decided to develop the manufacturing industry v…
若干年之前的一道题,当时能写出来还是超级开心的,虽然是个板子题.一直忘记写博客,备忘一下. 米勒拉判大素数,关于米勒拉宾是个什么东西,传送门了解一下:biubiubiu~ B. Goldbach 题目传送门 自己看题意吧,直接贴代码了. 代码: #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<al…
Description: There is a positive integer X, X's reversion count is Y. For example, X=123, Y=321; X=1234, Y=4321. Z=(X-Y)/9, Judge if Z is made up of only one number(0,1,2...9), like Z=11,Z=111,Z=222,don't consider '+'and '-'. Input: Input contains of…
A------------------------------------------------------------------------------------ 题目链接:http://202.197.224.59/OnlineJudge2/index.php/problem/read/id/1260 题解:随机 n 个数把矩阵补全成 n × n 的.那么就是要算伴随矩阵的第一行,也就是逆矩阵的第一列,高斯消元即可. 源码:(Q神写的高斯消元,先贴一下诶,待补) #include<cs…
有时候,很简单的模板题,可能有人没有做出来,(特指 I ),到时候一定要把所有的题目全部看一遍 目录 B 题解 E F 题解 H I 题解&代码 J B 输入样例 3 2 1 2 1 2 3 1 输出样例 1 说明 In the first sample case, the sequence [a1,a2,a3]=[0,1,0][a_1,a_2,a_3]=[0,1,0][a1,a2,a3]=[0,1,0] meets all the constraints and has the minimum…
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6438 Buy and Resell Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1233    Accepted Submission(s): 407 Problem Description The Power Cube is used…
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6447 YJJ's Salesman Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 919    Accepted Submission(s): 290 Problem Description YJJ is a salesman who h…
Tree and Permutation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 619    Accepted Submission(s): 214 Problem Description There are N vertices connected by N−1 edges, each edge has its own len…