###### tags: `APCS` `c++` # 題解 zerojudge g275: 1. 七言對聯 APCS ```cpp= #include<bits/stdc++.h> using namespace std; int main(){ int n,x; cin>>n;cin.ignore(); string a,b; int i; for (i=0;i<n;i++){ getline(cin,a); getline(cin,b); x=0; if((a[2]==a[6] or a[2]!=a[10]) or (b[2]==b[6] or b[2]!=b[10])) { cout<<"A"; x+=1; } if(a[12]!='1' or b[12]!='0'){ cout<<"B"; x+=1; } if((a[2]==b[2] or a[6]==b[6]) or a[10]==b[10]){ cout<<"C"; x+=1; } if(x==0) cout<<"None\n"; else cout<<"\n"; } } ```