Submission #290849

# Submission time Handle Problem Language Result Execution time Memory
290849 2020-09-04T13:49:49 Z blue Asceticism (JOI18_asceticism) C++11
0 / 100
1 ms 256 KB
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

//4 pts: N <= 10
int main()
{
    int N, K;
    cin >> N >> K;

    vector<int> X(N);
    for(int i = 1; i <= N; i++) X[i-1] = i;

    int res = 0;
    int a;
    while(next_permutation(X.begin(), X.end()))
    {
        a = 1;
        for(int i = 1; i < N; i++) if(X[i-1] > X[i]) a++;
        if(a == K) res++;
    }
    cout << res << '\n';
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -