Submission #144692

#TimeUsernameProblemLanguageResultExecution timeMemory
144692AASGArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include "shoes.h"

long long count_swaps(std::vector<int> s) {
    if(s[0]<1 && s.size()==1)return 0;
    else if(s[0]>1 && s.size()==1) return 1;
    std::int a;
    a=s.size();
     return (a-1)*(a-2)/2;
}

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:6:10: error: expected unqualified-id before 'int'
     std::int a;
          ^~~
shoes.cpp:7:5: error: 'a' was not declared in this scope
     a=s.size();
     ^