제출 #1334431

#제출 시각아이디문제언어결과실행 시간메모리
1334431yc11Arranging Shoes (IOI19_shoes)C++20
컴파일 에러
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;
}

컴파일 시 표준 에러 (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