Submission #297176

#TimeUsernameProblemLanguageResultExecution timeMemory
297176emnikArranging Shoes (IOI19_shoes)C++14
50 / 100
1066 ms3200 KiB
#include <bits/stdc++.h> #include "shoes.h" using namespace std; typedef long long ll; #define pb push_back #define all(x) begin(x), end(x) #define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); ll count_swaps(vector<int> arr){ ll ans=0; while(!arr.empty()){ int x = arr.front(); int i = find(arr.begin(), arr.end(), -x)-arr.begin(); ans+=i-(x<0); arr.erase(arr.begin()+i); arr.erase(arr.begin()); } return ans; }
#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...