Submission #1251257

#TimeUsernameProblemLanguageResultExecution timeMemory
1251257mohamedboukerche55Arranging Shoes (IOI19_shoes)C++20
0 / 100
0 ms324 KiB
#include "shoes.h" using namespace std; long long count_swaps(std::vector<int> S) { /*int n = S.size() / 2; int swaps = 0; for(int i = 0 ; i < n ; i++) { int t = S[i]; for(int j = i + 1;i<n ; i++) { if(j == -(t)) { swap(S[j],S[j-1]); swaps++; } } } return swaps;*/ int n = S.size()/2; 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...