CSES - Datatähti Open 2019 - Results
Submission details
Task:Classifier
Sender:pwild
Submission time:2019-01-20 01:45:12 +0200
Language:C++
Status:READY
Result:19
Feedback
groupverdictscore
#1ACCEPTED19
#20
#30
#40
Test results
testverdicttimegroup
#1ACCEPTED0.02 s1details
#20.02 s2details
#30.01 s3details
#40.02 s4details

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","_"}};

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;
	
	cout << sz(res) << endl;
	for (auto p: res) cout << p.xx << " -> " << p.yy << endl;
}

Test details

Test 1

Group: 1

Verdict: ACCEPTED

input
2

correct output
42
ED -> DE
FD -> DF
1DG -> DG1
GE -> EG
...

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

Test 2

Group: 2

Verdict:

input
3

correct output
54
ED -> DE
FD -> DF
HDG -> DGH
IDG -> DGI
...

user output
0

Test 3

Group: 3

Verdict:

input
4

correct output
66
ED -> DE
FD -> DF
HDG -> DGH
IDG -> DGI
...

user output
0

Test 4

Group: 4

Verdict:

input
5

correct output
78
ED -> DE
FD -> DF
HDG -> DGH
IDG -> DGI
...

user output
0