Submission #147516

#TimeUsernameProblemLanguageResultExecution timeMemory
147516ioilolcomArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #include "shoes.h" long long count_swaps(std::vector<int> s) { long long n = s.size(); ll swaps = n*(n-1)/2; return swaps; }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:9:2: error: 'll' was not declared in this scope
  ll swaps = n*(n-1)/2;
  ^~
shoes.cpp:10:11: error: 'swaps' was not declared in this scope
    return swaps;
           ^~~~~
shoes.cpp:6:12: warning: unused variable 'n' [-Wunused-variable]
  long long n = s.size();
            ^