Submission #1334431

#TimeUsernameProblemLanguageResultExecution timeMemory
1334431yc11Arranging Shoes (IOI19_shoes)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
int64 count_swaps(int[] S){
  int l = 0;
    int r = 0;
    int ans = 0;
    for (int i = 0;i<S.size();i++){

        if (S[i]>0) { r++;ans = ans+max(0LL,l-r);}
        else {l++;ans = ans+max(0LL,r-l+1);}

    }
    return ans;
}

Compilation message (stderr)

shoes.cpp:3:1: error: 'int64' does not name a type; did you mean 'int64_t'?
    3 | int64 count_swaps(int[] S){
      | ^~~~~
      | int64_t