| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1369166 | ezzzay | A String Problem (EGOI25_stringproblem) | C++20 | 1 ms | 352 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define int long long
const int N=3e5;
int d[N];
signed main(){
int n;
cin>>n;
vector<int>v;
for(int i=1;i<=n;i++){
int l,r;
cin>>l>>r;
if(l>r)swap(l,r);
d[r]= r-l;
v.pb(r);
}
int mx=0;
for(auto a:v){
int cnt=0;
for(auto b:v){
if(a<b)continue;
// a ni maax r
if((a-b)*2==d[a]-d[b])cnt++;
}
mx=max(mx,cnt);
}
cout<<n-mx;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
