sicada's blog

By sicada, history, 20 months ago, In English

Hi! This is my first post. For the problem 248- A I think I am submitting a correct code but it doesn't work our for some reason . Can someone help me figure out why? This is my code :

define ll long long int

define rep(i,t) for(i=0;i<t;i++)

define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

define vii vector


using namespace std; int main(){ IOS; ll n,i,l,r,t,sum,mum,leftopen,leftclosed,rightopened,rightclosed; cin>>n; rep(i,n){ cin>>l>>r; sum+=l; mum+=r; } cout<< (min(sum,n-sum) + min(mum,n-mum));


Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it