제출 #619775

#제출 시각아이디문제언어결과실행 시간메모리
619775UncoolAnonArranging Shoes (IOI19_shoes)C++14
10 / 100
1086 ms3796 KiB
#include "shoes.h" #include <bits/stdc++.h> using namespace std; long long count_swaps(vector<int> s){ int n=s.size(); vector<int> marked(n); long long answer=0; for(int i=0;i<n;i++){ if(!marked[i]){ for(int j=i+1;j<n;j++){ if(abs(s[j])==abs(s[i])&&(s[i]*s[j]<0)){ marked[j]=1; if(s[i]<0&&s[j]>0){} else ++answer; break ; } else{ answer+=(marked[j]^1); } } } } return answer; }
#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...