Task: | Sum |
Sender: | groeneprof |
Submission time: | 2019-01-20 14:08:39 +0200 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.02 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.01 s | details |
#4 | ACCEPTED | 0.01 s | details |
#5 | ACCEPTED | 0.04 s | details |
#6 | WRONG ANSWER | 0.03 s | details |
#7 | WRONG ANSWER | 0.02 s | details |
#8 | WRONG ANSWER | 0.02 s | details |
#9 | WRONG ANSWER | 0.02 s | details |
#10 | WRONG ANSWER | 0.02 s | details |
#11 | WRONG ANSWER | 0.02 s | details |
#12 | WRONG ANSWER | 0.01 s | details |
#13 | WRONG ANSWER | 0.02 s | details |
#14 | WRONG ANSWER | 0.02 s | details |
#15 | WRONG ANSWER | 0.01 s | details |
#16 | WRONG ANSWER | 0.03 s | details |
#17 | WRONG ANSWER | 0.02 s | details |
#18 | WRONG ANSWER | 0.02 s | details |
#19 | WRONG ANSWER | 0.01 s | details |
#20 | WRONG ANSWER | 0.02 s | details |
#21 | WRONG ANSWER | 0.04 s | details |
#22 | WRONG ANSWER | 0.05 s | details |
#23 | WRONG ANSWER | 0.06 s | details |
#24 | WRONG ANSWER | 0.06 s | details |
#25 | WRONG ANSWER | 0.07 s | details |
#26 | WRONG ANSWER | 0.08 s | details |
#27 | WRONG ANSWER | 0.10 s | details |
#28 | WRONG ANSWER | 0.11 s | details |
Code
#include <bits/stdc++.h> #define int long long #define P(x) do {if(debug) cout << x << endl;} while(false) #define H(x) P(#x << ": " << x) #define FR(i, a, b) for(int i = (a); i < (b); ++i) #define F(i, n) FR(i, 0, n) #define DR(i, a, b) for(int i = (b); i --> (a);) #define D(i, n) DR(i, 0, n) #define S(s) (int)(s).size() #define ALL(x) (x).begin(), (x).end() #define MI(x, a) (x) = min(x, a) #define MA(x, a) (x) = max(x, a) #define V vector #define pb push_back #define mp make_pair using namespace std; const bool debug = 1; signed main() { ios_base::sync_with_stdio(true); cin.tie(0); int n; cin>>n; int c=0; FR(i,1, n){ for(int j = i+1; j<n; j++){ if(n-i-j!=i && n-i-j>j && n-i-j>0){ c++; cout<<i<<" "<<j<<" "<<n-i-j<<endl; } } } cout<<c; return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 |
correct output |
---|
0 |
user output |
---|
0 |
Test 2
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
0 |
user output |
---|
0 |
Test 3
Verdict: ACCEPTED
input |
---|
3 |
correct output |
---|
0 |
user output |
---|
0 |
Test 4
Verdict: ACCEPTED
input |
---|
4 |
correct output |
---|
0 |
user output |
---|
0 |
Test 5
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
0 |
user output |
---|
0 |
Test 6
Verdict: WRONG ANSWER
input |
---|
6 |
correct output |
---|
1 |
user output |
---|
1 2 3 1 |
Test 7
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
1 |
user output |
---|
1 2 4 1 |
Test 8
Verdict: WRONG ANSWER
input |
---|
8 |
correct output |
---|
2 |
user output |
---|
1 2 5 1 3 4 2 |
Test 9
Verdict: WRONG ANSWER
input |
---|
9 |
correct output |
---|
3 |
user output |
---|
1 2 6 1 3 5 2 3 4 3 |
Test 10
Verdict: WRONG ANSWER
input |
---|
10 |
correct output |
---|
4 |
user output |
---|
1 2 7 1 3 6 1 4 5 2 3 5 4 |
Test 11
Verdict: WRONG ANSWER
input |
---|
20 |
correct output |
---|
24 |
user output |
---|
1 2 17 1 3 16 1 4 15 1 5 14 1 6 13 ... Truncated |
Test 12
Verdict: WRONG ANSWER
input |
---|
30 |
correct output |
---|
61 |
user output |
---|
1 2 27 1 3 26 1 4 25 1 5 24 1 6 23 ... Truncated |
Test 13
Verdict: WRONG ANSWER
input |
---|
40 |
correct output |
---|
114 |
user output |
---|
1 2 37 1 3 36 1 4 35 1 5 34 1 6 33 ... Truncated |
Test 14
Verdict: WRONG ANSWER
input |
---|
50 |
correct output |
---|
184 |
user output |
---|
1 2 47 1 3 46 1 4 45 1 5 44 1 6 43 ... Truncated |
Test 15
Verdict: WRONG ANSWER
input |
---|
60 |
correct output |
---|
271 |
user output |
---|
1 2 57 1 3 56 1 4 55 1 5 54 1 6 53 ... Truncated |
Test 16
Verdict: WRONG ANSWER
input |
---|
70 |
correct output |
---|
374 |
user output |
---|
1 2 67 1 3 66 1 4 65 1 5 64 1 6 63 ... Truncated |
Test 17
Verdict: WRONG ANSWER
input |
---|
80 |
correct output |
---|
494 |
user output |
---|
1 2 77 1 3 76 1 4 75 1 5 74 1 6 73 ... Truncated |
Test 18
Verdict: WRONG ANSWER
input |
---|
90 |
correct output |
---|
631 |
user output |
---|
1 2 87 1 3 86 1 4 85 1 5 84 1 6 83 ... Truncated |
Test 19
Verdict: WRONG ANSWER
input |
---|
100 |
correct output |
---|
784 |
user output |
---|
1 2 97 1 3 96 1 4 95 1 5 94 1 6 93 ... Truncated |
Test 20
Verdict: WRONG ANSWER
input |
---|
200 |
correct output |
---|
3234 |
user output |
---|
1 2 197 1 3 196 1 4 195 1 5 194 1 6 193 ... Truncated |
Test 21
Verdict: WRONG ANSWER
input |
---|
300 |
correct output |
---|
7351 |
user output |
---|
1 2 297 1 3 296 1 4 295 1 5 294 1 6 293 ... Truncated |
Test 22
Verdict: WRONG ANSWER
input |
---|
400 |
correct output |
---|
13134 |
user output |
---|
1 2 397 1 3 396 1 4 395 1 5 394 1 6 393 ... Truncated |
Test 23
Verdict: WRONG ANSWER
input |
---|
500 |
correct output |
---|
20584 |
user output |
---|
1 2 497 1 3 496 1 4 495 1 5 494 1 6 493 ... Truncated |
Test 24
Verdict: WRONG ANSWER
input |
---|
600 |
correct output |
---|
29701 |
user output |
---|
1 2 597 1 3 596 1 4 595 1 5 594 1 6 593 ... Truncated |
Test 25
Verdict: WRONG ANSWER
input |
---|
700 |
correct output |
---|
40484 |
user output |
---|
1 2 697 1 3 696 1 4 695 1 5 694 1 6 693 ... Truncated |
Test 26
Verdict: WRONG ANSWER
input |
---|
800 |
correct output |
---|
52934 |
user output |
---|
1 2 797 1 3 796 1 4 795 1 5 794 1 6 793 ... Truncated |
Test 27
Verdict: WRONG ANSWER
input |
---|
900 |
correct output |
---|
67051 |
user output |
---|
1 2 897 1 3 896 1 4 895 1 5 894 1 6 893 ... Truncated |
Test 28
Verdict: WRONG ANSWER
input |
---|
1000 |
correct output |
---|
82834 |
user output |
---|
1 2 997 1 3 996 1 4 995 1 5 994 1 6 993 ... Truncated |