Submission #499719

#TimeUsernameProblemLanguageResultExecution timeMemory
499719MurotYArranging Shoes (IOI19_shoes)C++14
10 / 100
1 ms420 KiB
#include <bits/stdc++.h>
#include "shoes.h"
using namespace std;
long long count_swaps(std::vector<int> s) {

    vector <int> v;
    v=s;
    int n=s.size();
//cout << n << " ";
    if (n/2 == 1){
        if (v[0] < v[1]) return 0;
        else return 1;
    }

}

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:6:18: warning: control reaches end of non-void function [-Wreturn-type]
    6 |     vector <int> v;
      |                  ^
#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...