Submission #889082

#TimeUsernameProblemLanguageResultExecution timeMemory
889082Lincito_31Arranging Shoes (IOI19_shoes)C++14
10 / 100
1070 ms2960 KiB
#include <bits/stdc++.h> #include "shoes.h" using namespace std; long long x=0; long long count_swaps(vector<int> s) { string xd=""; int tam=s.size(); for(int i=0;i<tam;i++){ if(s[i]>0){ xd=xd+"+"; }else{ xd=xd+"-"; } } int segura=1; for(int i=0;i<tam;i++){ if(xd[i*2]=='+'){ for(;xd[segura]=='+';segura+=2){ } x+=abs(2*i-segura); } } return x; }
#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...