版本比较
题解 CF913E 【Logical Expression】
正文
增加 2 行删除 2 行
23 行未改动2425262728282930313233343536363738394032 行未改动23 行未改动
```cpp#include<bits/stdc++.h>using namespace std;string f[256][4];//the minimum of data i, with overall state j(0:or 1:and 2:not 3:const) string f[256][4];//the minimum of data i, with overall state j(0:or 1:and 2:not 3:const)map<string,int>mp;string s[256],r[256];string match(pair<string,int>x,pair<string,int>y,int op){// cout<<x.first<<' '<<y.first<<' '<<op<<'='; if(op>x.second)x.first="("+x.first+")"; if(op>=y.second)y.first="("+y.first+")";// cout<<x.first+(op==1?'&':'|')+y.first<<endl; return x.first+(op==1?'&':'|')+y.first; return x.first+(op==1?'&':'|')+y.first;}string rev(pair<string,int>x){ if(x.second>=2)return "!"+x.first; return "!("+x.first+")";32 行未改动