Submission #253440

#TimeUsernameProblemLanguageResultExecution timeMemory
253440BadrangiikhArranging Shoes (IOI19_shoes)C++14
25 / 100
33 ms1924 KiB
#include<bits/stdc++.h> #include <deque> #include <cmath> using namespace std; #define ll long long /*freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);*/ int count_swaps ( vector < int > s ) { long long n = s . size ( ) / 2 ; if ( n == 1 ) { if ( s [ 0 ] < s [ 1 ] ) return 0 ; else return 1 ; } return ( n - 1 ) * n / 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...