#include <bits/stdc++.h>
using namespace std;
#define int long long
#define nl endl
#define hehe ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL) ;
// const int mod = 998244353;
const int mod = 1e9+7;
const int M = 2e5+5;
void solve(){
int n; cin >> n;
for(int i = 1; i<=n; i++){
int l,r; cin >> l >> r;
}
if(n%4!=0){
cout << "-1" << nl;
return;
}
else{
cout << (n/4)*2 << nl;
}
}
signed main(){
hehe
// int t; cin >> t;
int t = 1;
while(t--){
solve();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |