CSES - Datatähti Open 2019 - Results
Submission details
Task:Sum
Sender:pwild
Submission time:2019-01-20 02:04:47 +0200
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.02 sdetails
#20.01 sdetails
#30.02 sdetails
#40.02 sdetails
#5ACCEPTED0.02 sdetails
#60.02 sdetails
#70.02 sdetails
#80.01 sdetails
#90.01 sdetails
#100.03 sdetails
#110.02 sdetails
#120.03 sdetails
#130.03 sdetails
#140.02 sdetails
#150.02 sdetails
#160.03 sdetails
#170.01 sdetails
#180.02 sdetails
#190.03 sdetails
#200.02 sdetails
#210.03 sdetails
#220.03 sdetails
#230.01 sdetails
#240.03 sdetails
#250.01 sdetails
#260.02 sdetails
#270.03 sdetails
#280.01 sdetails

Code

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll,ll> pll;
typedef vector<bool> vb;
const ll oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define FOR(i,a,b) for (ll i = (a); i < (b); i++)
#define FORD(i,a,b) for (ll i = (b)-1; i >= (a); i--)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define has(c,i) ((c).find(i) != end(c))
#define TR(X) ({ if(1) cerr << "TR: " << (#X) << " = " << (X) << endl; })

vector<pair<string,string>> res2 = {
{"Z0","Z"},
{"Z1","Z"},
{"0Z","Z"},
{"1Z","Z"},
{"0M","M0"},
{"1M","M1"},
{"0N","N0"},
{"1N","N1"},
{"0BM","B"},
{"1BN","B"},
{"BM","Z"},
{"BN","Z"},
{"H0","0H"},
{"H1","1H"},
{"HE","C"},
{"D","BH"},
{"C00","00E"},
{"C01","01E"},
{"C10","10E"},
{"C11","11E"},
{"C0","Z"},
{"C1","Z"},
{"0C","MC"},
{"1C","NC"},
{"BC","_"},
{"B0","0D"},
{"B1","1D"},
{"1A","A1"},
{"A","BC"},
{"0","A0"},
{"11","_"}};

vector<pair<string,string>> res3 = {
{"Z0","Z"},
{"Z1","Z"},
{"0Z","Z"},
{"1Z","Z"},
{"0X","X0"},
{"1X","X1"},
{"0Y","Y0"},
{"1Y","Y1"},
{"0AX","A"},
{"1AY","A"},
{"AX","Z"},
{"AY","Z"},
{"0BX","XB"},
{"1BY","YB"},
{"BX","Z"},
{"BY","Z"},
{"Q0","0Q"},
{"Q1","1Q"},
{"QH","C"},
{"QG","BQ"},
{"F","AQ"},
{"C000","000H"},
{"C001","001H"},
{"C010","010H"},
{"C011","011H"},
{"C100","100H"},
{"C101","101H"},
{"C110","110H"},
{"C111","111H"},
{"C0","Z"},
{"C1","Z"},
{"0C","XC"},
{"1C","YC"},
{"B00","00G"},
{"B01","01G"},
{"B10","10G"},
{"B11","11G"},
{"ABC","_"},
{"A0","0F"},
{"A1","1F"},
{"1W","W1"},
{"W","ABC"},
{"0","W0"},
{"111","_"}};
vector<pair<string,string>> res4 = {
{"Z0","Z"},
{"Z1","Z"},
{"0Z","Z"},
{"1Z","Z"},
{"0X","X0"},
{"1X","X1"},
{"0Y","Y0"},
{"1Y","Y1"},
{"0AX","A"},
{"1AY","A"},
{"AX","Z"},
{"AY","Z"},
{"0BX","XB"},
{"1BY","YB"},
{"BX","Z"},
{"BY","Z"},
{"0CX","XC"},
{"1CY","YC"},
{"CX","Z"},
{"CY","Z"},
{"Q0","0Q"},
{"Q1","1Q"},
{"QI","D"},
{"QH","CQ"},
{"QG","BQ"},
{"F","AQ"},
{"D0000","0000I"},
{"D0001","0001I"},
{"D0010","0010I"},
{"D0011","0011I"},
{"D0100","0100I"},
{"D0101","0101I"},
{"D0110","0110I"},
{"D0111","0111I"},
{"D1000","1000I"},
{"D1001","1001I"},
{"D1010","1010I"},
{"D1011","1011I"},
{"D1100","1100I"},
{"D1101","1101I"},
{"D1110","1110I"},
{"D1111","1111I"},
{"D0","Z"},
{"D1","Z"},
{"0D","XD"},
{"1D","YD"},
{"C000","000H"},
{"C001","001H"},
{"C010","010H"},
{"C011","011H"},
{"C100","100H"},
{"C101","101H"},
{"C110","110H"},
{"C111","111H"},
{"B00","00G"},
{"B01","01G"},
{"B10","10G"},
{"B11","11G"},
{"ABCD","_"},
{"A0","0F"},
{"A1","1F"},
{"1W","W1"},
{"W","ABCD"},
{"0","W0"},
{"111","_"}};

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	ll n; cin >> n;
	
	vector<pair<string,string>> res;

	if (n == 2) res = res2;
	if (n == 3) res = res3;
	if (n == 4) res = res4;
	
	cout << sz(res) << endl;
	for (auto p: res) cout << p.xx << " -> " << p.yy << endl;
}

Test details

Test 1

Verdict: ACCEPTED

input
1

correct output
0

user output
0

Test 2

Verdict:

input
2

correct output
0

user output
31
Z0 -> Z
Z1 -> Z
0Z -> Z
1Z -> Z
...
Truncated

Test 3

Verdict:

input
3

correct output
0

user output
44
Z0 -> Z
Z1 -> Z
0Z -> Z
1Z -> Z
...
Truncated

Test 4

Verdict:

input
4

correct output
0

user output
65
Z0 -> Z
Z1 -> Z
0Z -> Z
1Z -> Z
...
Truncated

Test 5

Verdict: ACCEPTED

input
5

correct output
0

user output
0

Test 6

Verdict:

input
6

correct output
1

user output
0

Test 7

Verdict:

input
7

correct output
1

user output
0

Test 8

Verdict:

input
8

correct output
2

user output
0

Test 9

Verdict:

input
9

correct output
3

user output
0

Test 10

Verdict:

input
10

correct output
4

user output
0

Test 11

Verdict:

input
20

correct output
24

user output
0

Test 12

Verdict:

input
30

correct output
61

user output
0

Test 13

Verdict:

input
40

correct output
114

user output
0

Test 14

Verdict:

input
50

correct output
184

user output
0

Test 15

Verdict:

input
60

correct output
271

user output
0

Test 16

Verdict:

input
70

correct output
374

user output
0

Test 17

Verdict:

input
80

correct output
494

user output
0

Test 18

Verdict:

input
90

correct output
631

user output
0

Test 19

Verdict:

input
100

correct output
784

user output
0

Test 20

Verdict:

input
200

correct output
3234

user output
0

Test 21

Verdict:

input
300

correct output
7351

user output
0

Test 22

Verdict:

input
400

correct output
13134

user output
0

Test 23

Verdict:

input
500

correct output
20584

user output
0

Test 24

Verdict:

input
600

correct output
29701

user output
0

Test 25

Verdict:

input
700

correct output
40484

user output
0

Test 26

Verdict:

input
800

correct output
52934

user output
0

Test 27

Verdict:

input
900

correct output
67051

user output
0

Test 28

Verdict:

input
1000

correct output
82834

user output
0