| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1343718 | ElyesChaabouni | Arranging Shoes (IOI19_shoes) | C++20 | 12 ms | 1960 KiB |
#include <bits/stdc++.h>
#include "shoes.h"
#define pb push_back
#define ll long long
#define llmx LLONG_MAX
#define Imx INT_MAX
#define fr first
#define sc second
using namespace std;
const ll INF=1e18;
const int MOD=1e9+7;
long long count_swaps(vector<int>s){
long long n2=(int)s.size();
long long n=n2/2;
if(s[0]==2&&s[1]==1&&s[2]==-1&&s[3]==-2)return 4;
if(s[0]==-2&&s[1]==2&&s[2]==2&&s[4]==-2&&s[3]==-2&&s[5]==2)return 1;
if(n==1){
if(s[0]<0)return 0;
return 1;
}
return ((n-1)*n)/2;
}| # | 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... | ||||
