单词方阵

https://www.luogu.org/problemnew/show/P1101

/*
*@Author:   STZG
*@Language: C++
*/
#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
typedef __int128 lll;
const int N=100+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,q;
char str[N][N];
char vis[N][N];
char s[10]="yizhong";
int a[][2]={{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
bool  dfs(int x,int y,int c,int k){
    if(c==7){
        return 1;
    }else{
        int tx=x+a[k][0];
        int ty=y+a[k][1];
        if(0<=tx&&tx> str[i];
    for(int i=0;i

 

你可能感兴趣的:(#,C++)