Task: | Zbrka |
Sender: | untokarila |
Submission time: | 2019-07-26 15:26:26 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | details |
#2 | WRONG ANSWER | 0.02 s | details |
#3 | WRONG ANSWER | 0.02 s | details |
#4 | TIME LIMIT EXCEEDED | -- | details |
#5 | TIME LIMIT EXCEEDED | -- | details |
#6 | TIME LIMIT EXCEEDED | -- | details |
#7 | TIME LIMIT EXCEEDED | -- | details |
#8 | TIME LIMIT EXCEEDED | -- | details |
#9 | TIME LIMIT EXCEEDED | -- | details |
#10 | TIME LIMIT EXCEEDED | -- | details |
#11 | TIME LIMIT EXCEEDED | -- | details |
#12 | TIME LIMIT EXCEEDED | -- | details |
Code
#include <bits/stdc++.h> #define P 1000000007 #define ll long long using namespace std; int main(){ int q; cin >> q; for(int n=1; n<=q; n++){ int d[1010] = {0}; vector<int> v; for(int i=1; i<=n; i++) v.push_back(i); while(next_permutation(v.begin(), v.end())){ int s = 0; for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ if(v[i]>v[j]) s++; } } d[s]++; } d[0] = 1; for(int i=0; i<n*n/2; i++) cout << d[i] << ' '; cout << '\n'; } return 0; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
1 1 |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 2
Verdict: WRONG ANSWER
input |
---|
9 36 |
correct output |
---|
1 |
user output |
---|
1 1 1 2 2 1 1 3 5 6 5 3 1 0 1 4 9 15 20 22 20 15 9 4 1 0 ... Truncated |
Test 3
Verdict: WRONG ANSWER
input |
---|
9 37 |
correct output |
---|
0 |
user output |
---|
1 1 1 2 2 1 1 3 5 6 5 3 1 0 1 4 9 15 20 22 20 15 9 4 1 0 ... Truncated |
Test 4
Verdict: TIME LIMIT EXCEEDED
input |
---|
20 191 |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 5
Verdict: TIME LIMIT EXCEEDED
input |
---|
51 93 |
correct output |
---|
652564375 |
user output |
---|
(empty) |
Test 6
Verdict: TIME LIMIT EXCEEDED
input |
---|
150 15 |
correct output |
---|
906085333 |
user output |
---|
(empty) |
Test 7
Verdict: TIME LIMIT EXCEEDED
input |
---|
432 10000 |
correct output |
---|
532401236 |
user output |
---|
(empty) |
Test 8
Verdict: TIME LIMIT EXCEEDED
input |
---|
987 4 |
correct output |
---|
621481900 |
user output |
---|
(empty) |
Test 9
Verdict: TIME LIMIT EXCEEDED
input |
---|
999 931 |
correct output |
---|
502211067 |
user output |
---|
(empty) |
Test 10
Verdict: TIME LIMIT EXCEEDED
input |
---|
999 5000 |
correct output |
---|
722028249 |
user output |
---|
(empty) |
Test 11
Verdict: TIME LIMIT EXCEEDED
input |
---|
999 8234 |
correct output |
---|
263421764 |
user output |
---|
(empty) |
Test 12
Verdict: TIME LIMIT EXCEEDED
input |
---|
1000 10000 |
correct output |
---|
463544056 |
user output |
---|
(empty) |