提姐
2024-10-23 19:24:16
发布于:江西
14阅读
0回复
0点赞
因为我们很容易漏掉头文件,但万能头也可能会漏掉,所以我们多写几行,就不担心找不到需要的头文件是否漏掉了。
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <limits>
#include <list>
#include <map>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>
#include <cwchar>
#include <cwctype>
#include <complex.h>
#include <fenv.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <tgmath.h>
#define pai 3.1415926
using namespace std;
long long a[114][514],b[514];
string e;
int as,bs,x;
char kdsj;
double sdv;
long double vsd;
float sf;
long hbf;
signed int svfd;
signed long shvfi;
signed long long vhs;
unsigned int bshid;
unsigned long wrnm;
unsigned long long haihaihai;
long long i=1;
int n,m,t,j,p[6][6],book[6][6];
int sx,sy,fx,fy;
int dir[4][2]={
{0,1},
{1,0},
{0,-1},
{-1,0}
};
int next_[8][2]={{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};
void bfs(int x,int y)
{
for(int i=0;i<=7;i++)
{
int nx=x+next_[i][0];
int ny=y+next_[i][1];
if(nx<1||nx>n||ny<1||ny>m||a[nx][ny]=='.'||book[nx][ny]==1)
continue;
book[nx][ny]=1;
bfs(nx,ny);
}
}
int find(int number)
{
int l=0,r=n+1;
while(l+1!=r)
{
int mid=l+(r-l)/2;
if(b[mid]==number) return mid;
else if(b[mid]>x) r=mid;
else l=mid;
}
return -1;
}
void dfs(int x,int y)
{
if(x==fx&&y==fy)
{
j++;
return;
}
for(int i=0;i<=3;i++)
{
int nx=x+dir[i][0];
int ny=y+dir[i][1];
if(nx>n||1>nx||ny>m||1>ny||book[nx][ny]==1||p[nx][ny]==1)
continue;
book[nx][ny]=1;
dfs(nx,ny);
book[nx][ny]=0;
}
}
int main()
{
for(;i<=pai-0.1415926-1;i++,i--,i++)
{
if(!(i!=(1>>1)+1)) cin>>b[1];
else if(!(i!=(1>>1)+1+1)) scanf("%d",&a[abs(1)][0+1]);
}//QwQ
/*TWT*/
cout<<a[1][1]+b[1];
}
这里空空如也
有帮助,赞一个