CSES - Datatähti Open 2019 - Results
Submission details
Task:Sum
Sender:groeneprof
Submission time:2019-01-20 14:08:39 +0200
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.02 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails
#4ACCEPTED0.01 sdetails
#5ACCEPTED0.04 sdetails
#60.03 sdetails
#70.02 sdetails
#80.02 sdetails
#90.02 sdetails
#100.02 sdetails
#110.02 sdetails
#120.01 sdetails
#130.02 sdetails
#140.02 sdetails
#150.01 sdetails
#160.03 sdetails
#170.02 sdetails
#180.02 sdetails
#190.01 sdetails
#200.02 sdetails
#210.04 sdetails
#220.05 sdetails
#230.06 sdetails
#240.06 sdetails
#250.07 sdetails
#260.08 sdetails
#270.10 sdetails
#280.11 sdetails

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:

input
6

correct output
1

user output
1 2 3
1

Test 7

Verdict:

input
7

correct output
1

user output
1 2 4
1

Test 8

Verdict:

input
8

correct output
2

user output
1 2 5
1 3 4
2

Test 9

Verdict:

input
9

correct output
3

user output
1 2 6
1 3 5
2 3 4
3

Test 10

Verdict:

input
10

correct output
4

user output
1 2 7
1 3 6
1 4 5
2 3 5
4

Test 11

Verdict:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

input
1000

correct output
82834

user output
1 2 997
1 3 996
1 4 995
1 5 994
1 6 993
...
Truncated