| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1349759 | ozner77 | A String Problem (EGOI25_stringproblem) | C++20 | 63 ms | 12700 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll n;
cin>>n;
map<ll,ll> M,M2;
for(int i=0;i<n;i++){
ll a,b;
cin>>a>>b;
if(a==0 || b==0){
if((a+b+2*n)%2!=0){
M2[(a+b+2*n-1)/2]++;
}
}else if((a+b)%2!=0){
M2[(a+b-1)/2]++;
}
if(abs(a+b)%2!=0){
M[(abs(a+b)-1)/2]++;
}
}
ll ans=0;
for(auto x:M){
ans=max(ans,x.second);
}
for(auto x:M2){
ans=max(ans,x.second);
}
cout<<n-ans;
}| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
