Submission #946267

# Submission time Handle Problem Language Result Execution time Memory
946267 2024-03-14T13:12:38 Z attky Arranging Shoes (IOI19_shoes) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h> 

using namespace std;

int64_t count_swaps(int[] S) {
    long long int n = sizeof(S) / sizeof(int);
    return (n*(n-1))/2;
}

Compilation message

shoes.cpp:5:27: error: expected ',' or '...' before 'S'
    5 | int64_t count_swaps(int[] S) {
      |                           ^
shoes.cpp: In function 'int64_t count_swaps(int*)':
shoes.cpp:6:30: error: 'S' was not declared in this scope
    6 |     long long int n = sizeof(S) / sizeof(int);
      |                              ^