Submission #286222

#TimeUsernameProblemLanguageResultExecution timeMemory
286222BeanZArranging Shoes (IOI19_shoes)C++14
10 / 100
1 ms380 KiB
#include <bits/stdc++.h> #include "shoes.h" using namespace std; #define ll long long #define endl '\n' const int N = 2e5 + 5; ll a[200005]; ll count_swaps(vector<int> s) { return (s[0] > s[1]); } /* int main(){ ios_base::sync_with_stdio(false); cin.tie(0); if (fopen("VietCT.INP", "r")){ freopen("VietCT.INP", "r", stdin); freopen("VietCT.OUT", "w", stdout); } ll n; cin >> n; for (int i = 1; i <= 2 * n; i++) cin >> a[i]; ll now = 1, ans = 0; for (int i = 1; i <= (2 * n); i++){ if (a[i] < 0){ ans = ans + abs(i - now); now += 2; } } cout << 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...