Submission #556118

#TimeUsernameProblemLanguageResultExecution timeMemory
556118Trisanu_DasArranging Shoes (IOI19_shoes)C++17
25 / 100
25 ms1876 KiB
#include <bits/stdc++.h> #include "shoes.h" using namespace std; long long count_swaps(vector<int> s) { long long n = s.size() / 2; if(n==1){ long long c=0; for(int i=0;i<(int)s.size()-1;i++){ if(s[i]>s[i+1])c++; } return c; } return (n * (n - 1)) / 2; }
#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...