| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1350865 | mati_gl | A String Problem (EGOI25_stringproblem) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a;
cin >> a;
int M = 2 * a;
vector<int> v(M, 0);
for(int i = 0; i < a; i++){
int b, c;
cin >> b >> c;
int h = (c - b + M) % M;
h = min(h, M - h);
v[h]++;
}
int f = 0;
for(int x = 0; x < M; x++){
f = max(f, v[x]);
}
cout << a - f << '\n';
return 0;
}| # | 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... | ||||
