#include#include #include using namespace std; const int N = 110; int main() { int n; cin>>n; int a=0,b=0; while(n--){ int x,y; cin>>x>>y; x--,y--; if((x+2)%3==y) a++; else if((x+1)%3==y) b++; } cout<

#include#include #include using namespace std; const int N = 110; int main() { int n; cin>>n; int a=0,b=0; while(n--){ int x,y; cin>>x>>y; x--,y--; if((x+2)%3==y) a++; else if((x+1)%3==y) b++; } cout<