제출 #1004041

#제출 시각아이디문제언어결과실행 시간메모리
1004041LuvidiArranging Shoes (IOI19_shoes)C++17
45 / 100
17 ms3164 KiB
#include "shoes.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll, ll> #define pii pair<int, int> #define fs first #define sc second #define pb push_back long long count_swaps(std::vector<int> s) { int n=s.size()/2; ll ans=0,c=0; for(int i=0;i<2*n;i++){ if(s[i]>0)continue; ans+=(ll)abs(i-2*c); c++; } 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...