Submission #1032200

#TimeUsernameProblemLanguageResultExecution timeMemory
1032200shmaxArranging Shoes (IOI19_shoes)C++17
10 / 100
0 ms348 KiB
#include "shoes.h" #include <bits/stdc++.h> using namespace std; using i32 = int; #define int long long #define len(x) (int)(x.size()) #define inf 1000'000'000'000'000'000LL #define all(x) x.begin(), x.end() template<typename T> using vec = vector<T>; int count_swaps(vec<i32> s) { int n = len(s); int cnt = 0; int ans = 0; for (int i = n - 1; i >= 0; i--) { cnt += s[i] < 0; if (s[i] > 0) ans += cnt; } 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...