Submission #946267

#TimeUsernameProblemLanguageResultExecution timeMemory
946267attkyArranging Shoes (IOI19_shoes)C++17
Compilation error
0 ms0 KiB
#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 (stderr)

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);
      |                              ^