| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1369172 | ezzzay | A String Problem (EGOI25_stringproblem) | C++20 | 85 ms | 19504 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 cnt[N];
int L[N],R[N];
int D,n;
set<int>vc[N];
signed main(){
cin>>n;
vector<int>v;
pair<int,int>mx={0,0};
for(int i=0;i<n;i++){
int l,r;
cin>>l>>r;
L[i]=l,R[i]=r;
if((l+r)%2==0)continue;
cnt[(l+r)%(2*n)]++;
mx=max(mx,{cnt[(l+r)%(2*n)], (l+r)%(2*n)});
}
cout<<n-mx.ff<<endl;
D=mx.ss;
for(int i=0;i<n;i++){
if((L[i]+R[i])%(2*n)==D)continue;
int r= (2*n+D-L[i])%(2*n);
cout<<i<<" "<<R[i]<<" "<<r<<endl;
}
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
