03 2019 档案
摘要:1.原理: 不做过多解释,不会去翻高中数学教材 2.重要结论: 1.前n项和 可以 用 n + 2项的数减一得到 计算方法: 矩阵快速幂!!! 上板子题: Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 212
阅读全文
摘要:#include using namespace std; long long powM(long long a, long long b, long long mode) { long long sum = 1; a = a % mode; while (b > 0) { if (b % 2 == 1) //判断是否是奇数,是奇数的话将多...
阅读全文
摘要:5 23 4 7 2 63 5 2 9 03 8 5 7 32 5 3 1 49 8 6 3 5 15
阅读全文
摘要:一道不等式组的问题 算总时间 题目大意:现在有一个普通时钟,有时针、分针、秒针,秒针不是一秒一秒间断走的,而是连 续走的。给你一个度数D(小于等于120°)。求:24小时中,三个指针超过这个度数的时间占所 有时间的百分比是多少。
阅读全文
摘要:矩阵快速幂?递归取模? //超时解法: 没事少用递归一般都会超时 //矩阵快速幂: //想不到(不会。。。 神仙解法(时间和空间的高度优化)
阅读全文
摘要:一道map的水题(sb的我用sort超时了) // 超时代码 //AC代码
阅读全文
摘要:基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、 1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、 1094、1095
阅读全文
摘要:一道思维题,求和最大的子序列 https://vjudge.net/problem/HDU-1003
阅读全文
摘要:一 λ演算 λ 演算可以被称为最小的通用程序设计语言:它包括一条变换规则 (变量替换) 和一条函数定义方式,λ演算之通用在于,任何一个可计算函数都能用这种形式来表达和求值。 λ演算可以是有类型的也可以是无类型的,仅仅当输入的的数据类型对于有类型的λ演算函数来说是可以接受的时,有类型的λ演算函数才能被
阅读全文
摘要:内容:https://www.cnblogs.com/best/p/7474442.html#_label0 网上视频:https://www.bilibili.com/video/av14813510/ 资料: 权威Git书籍 ProGit(中文版) -> https://gitee.com/pr
阅读全文
摘要:#include #include #include using std::cin; using std::cout; using std::endl; using std::string; void next(string & str,int n,string * store,int &m); void swap(string & str,int location1,int location...
阅读全文
摘要://#include #include #include using namespace std; int N; // 1 tree[maxn + 5]; // tree[i]表示节点i的相邻节点 int d[maxn + 5]; // d[i]表示以i为根的子树的节点个数 #define ...
阅读全文
摘要:A. Example Input 91 3 3 6 7 6 8 8 9Output 4 1 #include <iostream> 2 3 using namespace std; 4 5 int main () { 6 int n; 7 cin >> n; 8 int a[10010]; 9 fo
阅读全文
摘要:问题一 Input: 5 50 0 5 0 00 4 3 8 29 5 7 2 71 9 6 5 41 0 0 6 2 Output: 4 Input: 10 100 0 0 0 0 0 0 0 0 00 5 2 6 4 3 1 7 8 00 6 4 2 3 5 1 4 6 00 3 6 4 1 2
阅读全文
摘要:Examples 输入 5 8 2 3 1 1 2 输出 4 输入 7 10 1 3 4 2 1 4 2 输出 2 输入 5 15 5 5 5 5 5 输出 1 输入 5 16 5 5 5 5 5 输出 2 输入 5 26 5 5 5 5 5 输出 -1 Note 在第一个样例中,泰泰学长第一天可以
阅读全文
摘要:A. Examples Input 120 51840Output 7Input 42 42 Output 0Input 48 72 Output -1 #include <iostream> using namespace std; int main() { int m, n; cin >> m
阅读全文
摘要:1.peninsula n.半岛 2.contradict vt.与...相矛盾 3.tactic n.策略 4.residue n.残余物 5.recruit n.新兵 6.topography n.地形 7.colony n.殖民地 8.supervise vt.监督,管理,指导 9.meteo
阅读全文
摘要:实验一 实验二
阅读全文
摘要:vulnerable 1.易受伤的,脆弱的 2.易受影响的;易受攻击(或责难)的;无防御的 philosophy 哲学 cynic 愤世嫉俗的人;冷嘲热讽的人 candidacy 候选(或候补)资格;候选人(或候补者)地位 Senate 1.[用作单] (美国国会和州议会及法国、澳大利亚等国的)参议
阅读全文
摘要:A.POJ_2631 1 #include<iostream> 2 #include<cstring> 3 #include<queue> 4 #include<vector> 5 using namespace std; 6 const int maxn = 24000; 7 int vis[ma
阅读全文
摘要:题目:https://www.cnblogs.com/lightac/p/10534726.html 第一题 第二题 第三题
阅读全文
摘要:第一题 第二题 第三题 第四题 第五题 第六题
阅读全文
摘要:问题一(数字根问题) 问题二(电梯问题) (1)Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers.
阅读全文
摘要:A.POJ_1321考查DFS的一个循环中递归调用 1 #include<iostream> 2 #include<cstring> 3 4 using namespace std; 5 char a[10][10]; //记录棋盘位置 6 int book[10]; //记录一列是否已经放过棋子
阅读全文
摘要:EG1 激光炸弹题意:给你n个点的坐标及权值,用r * r的范围最大覆盖是多少题解//二维的 前缀和 问题#include #include using namespace std;int n, r;int ta, tb;int x, y, w;int s...
阅读全文
摘要:题目:https://blog.csdn.net/qq_43591782/article/details/88417426第一题#include #include using namespace std;int main() { int num = 0; c...
阅读全文
摘要:问题一(数字根问题)#include #include using namespace std;int roots(int num) { int res = 0; while (num) { res += num % 10; num /= 10; } i...
阅读全文
摘要:第一题 第二题 第三题 第四题 第五题 第六题
阅读全文
摘要:1.1 逻辑变量及其基本运算1.三个运算符或:+与:·非:-(在字母上方)2.七组基本公式:(背过)对于最后一个公式的证明:A + BC = A(1 + B + C) + BC ························· 由于1与上任何数都为1=A...
阅读全文
摘要:fraternity n. 大学男生联谊会rehearsal n. 排演,排练stock n. 股票leisure n. 娱乐tuition n. (学院、大学或私立学校的)学费grant n. 助学金annual a. 一年一次的Instagram 一款图...
阅读全文
摘要:第一题(对冒泡排序原理的理解)题意:第一行的输入代表下一行输入的无序数的数的个数,然后下一行,数字与上一行数字对应,若对应为1则该数可以与下一个数交换位置。根据冒泡排序可知,任何一个无序序列都可以通过相邻元素交换变成有序的。如果当前数字不能交换,则判断它是否...
阅读全文
摘要:package mainimport "fmt"/*函数说明:Erebus_shows_world 打印棋盘Erebus_plays_game 用户下棋、电脑下棋Erebus_checks_system 检测是否满足结束条件Erebus 英文名main 引出...
阅读全文
摘要:实验一:C++的一些基本输入实验二:用C++判断一个数是不是素数实验三:求一个数字分解成每一位数字的和模拟银行账户(写得比较傻)//#include//using namespace std;//void main()//{// char name[20];...
阅读全文
摘要:一、问题引入原题:杭电hdu1232畅通工程https://vjudge.net/problem/HDU-1232读不懂题请点击右上角关闭2.故事描述(来源于网络)并查集由一个整数型的数组和两个函数构成。数组pre[]记录了每个点的前导点是什么,函数find...
阅读全文
摘要:1.如何避免程序运行一闪而过法一在代码末尾加上:system(“pause”);法二1.鼠标右键点击 项目-下一步2.点击C/C++之后点击链接器再点击系统将子系统修改为 :控制台 (/SUBSYSTEM:CONSOLE) 即可2.如何使提示字符按回车能够输...
阅读全文