# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1249062 | bethance | Star triangles (IZhO11_triangle) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;int ans=0;r=0,l=0;
while(n--){
int a,b;
cin>>a>>b;
if(a==1){
r++;
}
if(b==1){
l++;
}if(a==b){
r--;
}
}
cout<<r*l;
}