A Good Set 分析:水题,选奇数即可 #include "iostream" #include "cstdio" #include "cstring" #include "cmath" using namespace std; //const int maxn=110; int T; int n; int main() { cin>>T; while(T--) { cin>>n; ;i<n…
Mujin Programming Challenge 2017 A - Robot Racing 如果每个数都是一个一个间隔开的,那么答案是\(n!\) 考虑把一个数挪到1,第二个数挪到3,以此类推,如果不行,证明前面中有个数肯定会被选择,所以任意选一个数到终点,继续这样的操作 最后剩下的乘一个阶乘即可 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #de…
Hope for the best, but prepare for the worst. 做最好的期望,做最坏的打算. Always remember that quotes about being ourselves are all about being strong and being confident in whatever we are doing and never give up. This is why self-development is so important, we…
Whatever is worth doing is worth doing well. 任何值得做的,就把它做好. Whatever is worth doing is worth doing well, that can be seen as a guideline in our life and work. Once we have evaluated the feasibility of one project, if we think it is worthing doing, we…
It is not the mountain we conquer but outselves. 我们要征服的不是高山,而是我们自己. After days of hard working, I sliding into the idling state again. Looking at the screen, with the program opened in the IDE, but I didn't tap any new code to perfect it. Just let th…
Do what you say, say what you do. 做你说过的,说你能做的. Do what I have said, live up to my promise, answer the expectations with gold. Sometimes we have to boast a little more than what we have done. It is just an effective tactic to win. However, if we boast…
CALC: 计算器题目描述大厨有一个计算器,计算器上有两个屏幕和两个按钮.初始时每个屏幕上显示的都是 0.每按一次第一个按钮,就会让第一个屏幕上显示的数字加 1,同时消耗 1 单位的能量.每按一次第二个按钮,会让第二个屏幕上显示的数字加上第一个屏幕上显示的数字,同时消耗 B 单位的能量.初始时,计算器有 N 单位的能量.大厨想知道在能量限制下,第二个屏幕上最大可以出现的数字是多少?输入格式输入的第一行包含一个整数 T,代表测试数据的组数.接下来是 T 组数据.每组数据仅有一行,包含两个整数 N…