Submission #1207860


Source Code Expand

Copy
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>

#define REP(i,x) for(int i=0 ; i<(int)(x) ; i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long

using namespace std;

int main(){
    int n;
    cin >> n;
    vector<string> S(n);
    REP(i, n){
        cin >> S[i];
    }
    string res = "";
    for(char c='a'; c<='z'; c++){
        int min_cnt = n;
        REP(i, n){
            int cnt = count(ALL(S[i]), c);
            min_cnt = min(min_cnt, cnt);
        }
        res += string(min_cnt, c);
    }
    cout << res << endl;
    return 0;
}

Submission Info

Submission Time
Task C - Dubious Document
User nel215
Language C++14 (GCC 5.4.1)
Score 0
Code Size 835 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_000.txt, 0_001.txt
All 0 / 300 0_000.txt, 0_001.txt, dec_half.txt, hand.txt, max.txt, max_10.txt, max_5.txt, maxx.txt, rnd.txt, single.txt
Case Name Status Exec Time Memory
0_000.txt 1 ms 256 KB
0_001.txt 1 ms 256 KB
dec_half.txt 1 ms 256 KB
hand.txt 1 ms 256 KB
max.txt 1 ms 256 KB
max_10.txt 1 ms 256 KB
max_5.txt 1 ms 256 KB
maxx.txt 1 ms 256 KB
rnd.txt 1 ms 256 KB
single.txt 1 ms 256 KB