CSES - KILO 2019 2/5 - Results
Submission details
Task:Ruudukko
Sender:hltk
Submission time:2019-05-14 18:59:58 +0300
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.03 s1details
#20.03 s1details
#30.01 s1details
#40.03 s1details
#50.02 s1details
#60.01 s2details
#70.02 s2details
#80.02 s2details
#90.01 s2details
#100.01 s2details
#110.02 s3details
#120.03 s3details
#130.03 s3details
#140.02 s3details
#150.02 s3details

Compiler report

input/code.cpp: In function 'void solve()':
input/code.cpp:26:30: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
  printf("%d %d %d\n", a, b, c);
                              ^
input/code.cpp:26:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
input/code.cpp:26:30: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]

Code

#include <bits/stdc++.h>
using namespace std;
void solve()
{
	long a, b, c, n;
	cin >> a >> b >> c >> n;
	if (a > c) swap(a,c);
	if (b > c) swap(b,c);
	if (a > b) swap(a,b);
	for (int i = 1; i <= n; ++i) {
		if (a + 1 == b && b == c) break;
		if (a == b && b + 1 == c) break;
		if (a + 1 == b && b + 1 == c) {
			if ((n - i + 1) % 2 == 1) {
				a++;
				c--;
			}
			break;
		}
		a ++;
		c --;
		if (a > c) swap(a,c);
		if (b > c) swap(b,c);
		if (a > b) swap(a,b);
	}
	printf("%d %d %d\n", a, b, c);
}
int main()
{
	int t; cin >> t;
	while (t--) solve();
}

Test details

Test 1

Group: 1

Verdict:

input
2

correct output
....................
.###################
.###################
.###################
.###################
...

user output
1714478848 2 23326064
1714478848 2 23326064

Test 2

Group: 1

Verdict:

input
5

correct output
....................
.################..#
.#################..
.#################..
.##################.
...

user output
-1537799680 5 29248880
-1537799680 5 29248880
-1537799680 5 29248880
-1537799680 5 29248880
-1537799680 5 29248880

Test 3

Group: 1

Verdict:

input
7

correct output
....................
.################..#
.#################..
.#################..
.##################.
...

user output
-2046174464 7 25480560
-2046174464 7 25480560
-2046174464 7 25480560
-2046174464 7 25480560
-2046174464 7 25480560
...

Test 4

Group: 1

Verdict:

input
8

correct output
....................
.###################
.###################
.###################
.###################
...

user output
8 32570736 1916097536
8 32570736 1916097536
8 32570736 1916097536
8 32570736 1916097536
8 32570736 1916097536
...

Test 5

Group: 1

Verdict:

input
9

correct output
....................
.###################
.###################
.###################
.###################
...

user output
9 24489328 -1223343872
9 24489328 -1223343872
9 24489328 -1223343872
9 24489328 -1223343872
9 24489328 -1223343872
...

Test 6

Group: 2

Verdict:

input
19

correct output
....................
.############..#####
.#############..####
.#############...###
.##############...##
...

user output
19 24735088 1549659392
19 24735088 1549659392
19 24735088 1549659392
19 24735088 1549659392
19 24735088 1549659392
...

Test 7

Group: 2

Verdict:

input
32

correct output
....................
.###################
.###################
.###################
.###################
...

user output
240521472 32 20458864
240521472 32 20458864
240521472 32 20458864
240521472 32 20458864
240521472 32 20458864
...

Test 8

Group: 2

Verdict:

input
44

correct output
....................
.################..#
.#################..
.#################..
.##################.
...

user output
1896646144 44 23002480
1896646144 44 23002480
1896646144 44 23002480
1896646144 44 23002480
1896646144 44 23002480
...

Test 9

Group: 2

Verdict:

input
76

correct output
....................
.########..######..#
.#########..######..
.#########...#####..
.##########...#####.
...

user output
1770538752 76 20114800
1770538752 76 20114800
1770538752 76 20114800
1770538752 76 20114800
1770538752 76 20114800
...

Test 10

Group: 2

Verdict:

input
93

correct output
....................
.########..##..##..#
.#########..##..##..
.#########...#...#..
.##########...#...#.
...

user output
93 28335472 -409512448
93 28335472 -409512448
93 28335472 -409512448
93 28335472 -409512448
93 28335472 -409512448
...

Test 11

Group: 3

Verdict:

input
141

correct output
....................
.################..#
.#################..
.#################..
.##################.
...

user output
141 30207344 1191236864
141 30207344 1191236864
141 30207344 1191236864
141 30207344 1191236864
141 30207344 1191236864
...

Test 12

Group: 3

Verdict:

input
422

correct output
....................
.####..##########..#
.#####..##########..
.#####...#########..
.######...#########.
...

user output
422 28663152 -935704832
422 28663152 -935704832
422 28663152 -935704832
422 28663152 -935704832
422 28663152 -935704832
...

Test 13

Group: 3

Verdict:

input
671

correct output
....................
.#.##########..##..#
....##########..##..
.#...#########...#..
.##...#########...#.
...

user output
671 28224880 7765504
671 28224880 7765504
671 28224880 7765504
671 28224880 7765504
671 28224880 7765504
...

Test 14

Group: 3

Verdict:

input
895

correct output
....................
.#.##..##..##..##..#
....##..##..##..##..
.#...#...#...#...#..
.##...#...#...#...#.
...

user output
-635278848 895 23149936
-635278848 895 23149936
-635278848 895 23149936
-635278848 895 23149936
-635278848 895 23149936
...

Test 15

Group: 3

Verdict:

input
956

correct output
....................
.#.##..######..##..#
....##..######..##..
.#...#...#####...#..
.##...#...#####...#.
...

user output
956 25804144 -484603904
956 25804144 -484603904
956 25804144 -484603904
956 25804144 -484603904
956 25804144 -484603904
...