#include<iostream>
#include<cstdio>
#define N 205
using namespace std;
int n, m;
int a[N];
int f[N][N];//邻接矩阵存边
inline void up...
#include <bits/stdc++.h>
#define int long long
#define PII pair<int,int>
#define MP make_pair
#define INF LONG_LONG_MAX
using ...
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#define MEM(arr,num) memset(arr,num,sizeo...
#include <cstring>
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
int n;
std::s...
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
#define MAXL 100010
int N, M, A[MAXL];
v...
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int ans;
char str1[233]...
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
set<int>s;
set<...
#include<bits/stdc++.h>
using namespace std;
int main() {
string n;
int s, i;
cin >> n >> s;
while (s) {
...
#include<bits/stdc++.h>
using namespace std;
string str[20];
int use[20], length = 0, n;
int canlink(string str1, string str2) {
for ...
#include <cstdio>
#include <cstring>
#include <cmath>
#define min(a,b) (((a)<(b))?(a):(b))
//洛谷 P1433 吃奶酪 状压DP
doubl...
给你一个n*n的格子的棋盘,每个格子里面有一个非负数。
从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。
#include <iostream>
using namespace std;
#defi...
//#include<iostream>
//#include<vector>
//#include<algorithm>
//#include<unordered_set>
//using namespace std;
//int...
#include<bits/stdc++.h> //美丽的万能头文件
using namespace std;
int n, ma[305][305], v[305][305], sx, sy, st, ans[305][305];//分别为陨石数量,陨石砸落地图,记录是否...
#include<iostream>//P1443
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<...
DFS搜索
#include<bits/stdc++.h>
using namespace std;
int Left,Right,minn,ans;
int s[5];
int a[21][5];
void search(int x,int y){
if(...
#include<bits/stdc++.h>
using namespace std;
const int maxn = 500010;
int n;
int a[maxn],b[maxn];
long long ans = 0;
//归并排序
void m...
C语言中,在使用时分配存储空间的变量的存储类型是 auto和Register
考察静态存储区和动态存储区。静态存储区的变量在程序一开始就占据存储空间,只有程序结束之后才会释放,有局部静态变量,全局变量,静态全局变量;动态存...
#include<iostream>
#include<string>
using namespace std;
int main() {
string s;
cin >> s;
int sym = 1, flag = 1; //sy...
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
while(cin>>n){
int cnt2 = 0, cnt5 = ...
#include<iostream>
using namespace std;
int dp[1000001];
int main(){
int n;
dp[0]=1;
while(cin>>n){
for(in...
#include <stdio.h>
#include <string.h>
int f(int m, int n);
int main()
{
int m, n;
while (scanf("%d %d", &m, &...
#include <iostream>
#include <algorithm>
#include <stack>
#include <string.h>
#include <stdio.h>
#include <...
#include <iostream>
#include <map>
using namespace std;
map<string, int> stringToInt;
map<int, string> intToString;
...
#include<iostream>
#include<string>
#include<vector>
using namespace std;
const int maxn = 26;
vector<int> g[maxn];...
#include <stdio.h>
#include <stdint.h>
#include <string.h>
void GetNumber(int n)
{
int res[15] = {0}, index = 0, cou...
#include<bits/stdc++.h>
#include<vector>
using namespace std;
int getCnt(vector<string>& proxy, vector<string>...
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<string.h>
#include<queue&...