#include<bits/stdc++.h>
#define N 20100
#define K 600
using namespace std;
bool attack[N], havequeen[N];
int n, m, k, sum;//sum为被攻击的位置个数...
期末考试结束了。
结束的本科期间最后一场学业考试心里百感交集。自己马上就不是一名本科生了,回想刚刚入校感叹时间的奇妙。
冲冲冲!!!!
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
using na...
#include
#include
using namespace std;
// 线性筛算法生成素数
void linearSieve(int n, vector& isPrime) {
fill(isPrime.begin(), isPri...
#include <iostream>
#include <vector>
using namespace std;
// 线性筛算法生成素数
void linearSieve(int n, vector<bool>& isPrime) ...
进度:
1、 初步复习STL
重点复习:map、set
2、看数学部分
目标:机试AK
PS:学校具体考研信息在院校信息中输入学校名称搜索可查看
传送门:https://noobdream.com/schoollist/
专硕
北京印刷学院
首都师范大学
首都经济贸易大学
北京联合大学
河北工程大学
河北地质大学
太原...
1.下列关于冯·诺依曼结构计算机基本思想的叙述中,错误的是
A.程序的功能都通过中央处理器执行指令实现
B.指令和数据都用二进制表示,形式上无差别
C.指令按地址访问,数据都在指令中直接给出
D.程序执行前,指令和数据需预先存放在存储器中
解析:
冯·诺依曼结构计算...
Q:在多道程序环境下,一方面,在内存中的某些进程由于某事件尚未发生而被阻塞运行,但它却占用了大量的内存空间,甚至有时可能出现在内存中所有进程都被阻塞而迫使CPU停止(空闲)下来的情况。另一方面,却又有许多作业在外存上等待(就绪),因无内存而不能进入内存运行的情况。显然这是对系统资源的一种浪费,...
class Solution {
public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
if(root == null || root == p || root...
class Solution {
public:
int DFS(TreeNode *root,int presum)
{
if(root==NULL)return 0;
int sum=presum*10+root->v...
class Solution {
public:
bool hasPathSum(TreeNode* root, int targetSum) {
if(root == NULL)
{
return false;
...
class Solution {
public:
int findMin(vector<int>& nums) {
int low = 0;
int high = nums.size() - 1;
whi...
动态规划
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
str...
1.力扣 寻找数组的中心索引
力扣参考答案
class Solution {
public:
int pivotIndex(vector<int> &nums) {
int total = accumulate(nums.beg...
#include<iostream>
#include<cstring>
#include<vector>
using namespace std;
// 可以支配的钱数、清单上可选择的物品种类、输入物品的价格、输入物品的受欢迎程度、状态转移...
#include<iostream>
using namespace std;
int main()
{
int dp[1005][1005] = { 0 };//表示前i件物品是否能凑出重量为j的方案,0表示否,1表示是
int w[1005];//单个物品...
#include<iostream>
using namespace std;
int dp[21][1010];
int w[21], c[21];
int main()
{
int N, V;
cin >> N >> V;//物品数...
#include<iostream>
using namespace std;
int dp[101][101];
int main()
{
string a,b;
memset(dp, 0, sizeof(dp));
cin >> a >...
#include <bits/stdc++.h>
using namespace std;
int n,a[105],dp_h[105],dp_t[105];
int main(){
while(cin>>n){
for(int i...
#include<iostream>
using namespace std;
int dp[10000];
int a[10000];
int n;
//求长度和求和
int LIS_nn()
{
int ans = 0;
for (int i = 1;...
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
int dp[1000010];
int a[1000010];
long long maxx;
int main()
...
#include<bits/stdc++.h>
using namespace std;
#include<queue>
const int maxn = 505;
bool mpt[maxn][maxn];
int lev[maxn];//点的入度
v...
#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
#define INF 0x3f3f3f3f
const int maxn = 105;...
#include<bits/stdc++.h>
using namespace std;
int m,n;
bool isVisit[105][105] = {false};
char a[105][105];
int dir[8][2] = {0,1,1,1,1,0...
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <...
#include <iostream>
#include <cstdio>
using namespace std;
int fa[1005];
int find(int x){
if(x == fa[x]){
return...
#include <bits/stdc++.h>
#define rep(i, s, e) for (int i = s; i < e; i++)
using namespace std;
string s; // 输入的字符串
vector<bool&...
#include<iostream>
#include<cstring>
#include<queue>
using namespace std;
const int maxn = 100 + 2;
char mpt[maxn][maxn]...