Submission #219760

#TimeUsernameProblemLanguageResultExecution timeMemory
219760VEGAnnArranging Shoes (IOI19_shoes)C++14
25 / 100
38 ms3200 KiB
#include <bits/stdc++.h> #include "shoes.h" #define all(x) x.begin(),x.end() #define PB push_back #define sz(x) ((int)x.size()) using namespace std; typedef long long ll; const int N = 100100; long long count_swaps(std::vector<int> s) { if (sz(s) == 2) { if (s[0] > 0) return 1; else return 0; } else { ll n = sz(s) / 2; return n * (n - 1ll) / 2ll; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...