제출 #965350

#제출 시각아이디문제언어결과실행 시간메모리
965350akacool445kArranging Shoes (IOI19_shoes)C++14
45 / 100
18 ms3272 KiB
#include "shoes.h" long long count_swaps(std::vector<int> s) { long long ans = 0; int a = 0, b = 0; for(int x : s) { if(x < 0) { if(b > 0) { ans += b; b--; } else { a++; } } else { if(a > 0) { a--; ans += a; } else { b++; } } } 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...