一道恶心的模拟,写了一整晚上也不知道哪里错,借助大神的代码AC了
这是Hint :The problem itself is easy of course. But some of the test cases of this problem are strange and annoying. Be careful!
#include<stdio.h>
#include<iostream>
#include<math.h>
#include<string.h>
#include<iomanip>
#include<stdlib.h>
#include<ctype.h>
#include<algorithm>
#include<deque>
#include<functional>
#include<iterator>
#include<vector>
#include<list>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<sstream>
#define CPY(A, B) memcpy(A, B, sizeof(A))
typedef long long LL;
typedef unsigned long long uLL;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const LL INFF = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-9;
const double OO = 1e20;
const double PI = acos (-1.0);
int dx[]= {0,1,1,1,0,-1,-1,-1};
int dy[]= {1,1,0,-1,-1,-1,0,1};
int gcd (const LL &a, const LL &b) {return b==0?a:gcd (b,a%b);}
LL LLpow (LL a, LL b) {
if (b==0) {return 1;}
LL t=LLpow (a,b/2);
if (b%2) {return t*t*a;}
return t*t;
}
using namespace std;
int T,t,n,m;
map<string,string> match[4];
char str[1010],str2[1010],s1[1010],s2[1010];
int type1,type2,Err,Over;
bool Has_Equal() {
int i,len=strlen (str);
bool flag=0,flag2=0;
for (i=0; i<len; i++) {
if (str[i]==34) {flag