链接:Miku 看起来蛮简单的,就是一道模拟 求出1-l到1-r,减一下 数据范围?longlong走起 kkkk #include<iostream> #include<cstdio> using namespace std; int k,m; long long l,r; long long s ...
分类:
其他好文 时间:
2020-07-18 22:43:02
阅读次数:
116
A 根据性质,\(a,b,c\) 中的最大值一定会在 $x,y,z $ 中出现两次 #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; int a[3]; while(t --) { memset(a ...
分类:
其他好文 时间:
2020-07-18 22:42:22
阅读次数:
86
#树上求和 题目链接:https://ac.nowcoder.com/acm/contest/5986/E ###涉及知识点: 二分 思维 ###solution: 二分出答案 假设答案是x的话,判断我们至少删除几个可以到达x 如果我们需要删除的数量大于m的话,那么此时答案一定是比小的(right ...
分类:
其他好文 时间:
2020-07-18 22:42:04
阅读次数:
73
本题考查库函数的实现原理,特别注意用O(logn)时间求a的n次方的优化算法。 C++版 #include <iostream> #include <cmath> using namespace std; bool g_InvalidInput = false; double powerWithUn ...
分类:
其他好文 时间:
2020-07-18 22:28:09
阅读次数:
76
题目 题目链接 PAT 1058 A+B in Hogwarts (20) 已知哈利波特的世界中,货币单位规则,求两个金额的总和 解题思路 思路1 每个单位各自相加,若有溢出累计到更大单位 思路2 计算总和化为最小单位,再进行单位拆分 易错点 总和取最小单位数字: 总和%最小单位进制数 知识点 已知 ...
分类:
其他好文 时间:
2020-07-18 22:24:15
阅读次数:
78
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=105; const int mod=1e9+7; int n; struct matrix { ll a[maxn][maxn]; m ...
分类:
其他好文 时间:
2020-07-18 22:14:26
阅读次数:
75
这个题目考察的是计算机基础知识。注意int型的-1在计算机中的二进制存储为补码0xFFFF FFFF,但是计算机在展示给我们的时候,是作为原码展示。 C++版 #include <iostream> using namespace std; int NumberOf1Plus(int n){ int ...
分类:
其他好文 时间:
2020-07-18 21:50:28
阅读次数:
72
/* *CF1380D.Berserk And Fireball *n个战士站成一排,分别有武力值ai。 *你有两种法术:火球和激怒。 *火球可以消耗x个法力,消灭连续k个战士。 *激怒可以消耗y个法力,选择相邻的两个战士,武力值大的会消灭武力值小的 *求最后留下的战士和数组b一样所需要的最小法力花 ...
分类:
其他好文 时间:
2020-07-18 19:52:26
阅读次数:
70
using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Reflection; usi ...
分类:
数据库 时间:
2020-07-18 16:11:44
阅读次数:
118
题目描述输入输出样例输入2 4 1 1 1 2 2 1 2 2 5 4 7 0 4 7 3 3 0 3 4样例输出Yes No提示n <= 1000000 T <= 10 0 <= x,y <= 10^9代码#include<bits/stdc++.h> using namespace std; c ...
分类:
其他好文 时间:
2020-07-18 16:06:57
阅读次数:
70