CSES - Datatähti 2019 alku - Results
Submission details
Task:Sanalista
Sender:ArktinenKarpalo
Submission time:2018-10-01 00:36:43 +0300
Language:text
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttimescore
#10.00 s0details

Code

#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define N (1<<17)
#define M 1000000007
#define P complex<long long>
#define X real()
#define Y imag()
using namespace std;
map<string, int> mp;
vector<pair<int,string>> v;
string s;
int main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
while(cin >> s) {
string st = "";
for(int i=0; i<3; i++) {
st.push_back(s[i]);
}
mp[st]++;
}
for(auto u:mp)
v.push_back(make_pair(u.second, u.first));
sort(v.rbegin(), v.rend());
string ans = "";
int lk = 0;
while(ans.size()<490) {
ans = ans + v[lk].second + "|";
lk++;
}
for(int i=0; i<150; i++) {
//cout << v[i].first << ", " << v[i].second << "\n";
}
cout<<ans;
}

Test details

Test 1

Verdict:

input
aakkonen
aakkosellinen
aakkosellisesti
aakkosellisuus
aakkosittain
...

correct output
(empty)

user output
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define N (1<<17)
...