Submission #978948

#TimeUsernameProblemLanguageResultExecution timeMemory
978948rshohruhPermutation (APIO22_perm)C++17
10 / 100
1 ms600 KiB
#include "perm.h" #include <bits/stdc++.h> using namespace std; std::vector<int> construct_permutation(long long k) { assert(k <= 100); vector<int> a(k-1); for(int i = 0; i < a.size(); ++i) a[i] = k-2-i; return a; }

Compilation message (stderr)

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:9:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  for(int i = 0; i < a.size(); ++i)
      |                 ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...