Submission #770604

#TimeUsernameProblemLanguageResultExecution timeMemory
770604teamariaaArranging Shoes (IOI19_shoes)C++17
25 / 100
20 ms3128 KiB
#include <bits/stdc++.h> #include "shoes.h" using namespace std; long long count_swaps(vector<int> s) { long long n = s.size() / 2; if(n == 1) if(s[0] < s[1]) return 0; else return 1; return n * (n - 1) / 2; }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:9:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
    9 |     if(n == 1)
      |       ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...