| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1293041 | lukaye_19 | Arranging Shoes (IOI19_shoes) | C++20 | 14 ms | 1964 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll count_swaps(vector<int>Shoes) {
ll c1 = 0;
ll c2 = 0;
ll cnt = 0;
for (ll i = 0; i < Shoes.size(); i++)
{
int Shoe = Shoes[i];
if (Shoe < 0)
{
cnt += abs(i - c1 * 2);
c1++;
}
else if (Shoe > 0 )
{
cnt += abs(i - c2 * 2 - 1);
c2++;
}
}
return cnt/2LL;
}| # | 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... | ||||
