Submission #621393

# Submission time Handle Problem Language Result Execution time Memory
621393 2022-08-03T18:23:42 Z kkkkkkkk Utrka (COCI14_utrka) C++17
80 / 80
138 ms 11084 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<string> v(2*n-1);
    for (int i=0;i<n+n-1;i++)
        cin >> v[i];
    sort(v.begin(),v.end());
    string rez=v[2*n-2];
    for (int i=0;i<2*n-2;i+=2)
    {
        if (v[i]!=v[i+1])
        {
            rez=v[i];
            break;
        }
    }
    cout << rez << endl;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 2 ms 340 KB Output is correct
6 Correct 122 ms 5644 KB Output is correct
7 Correct 100 ms 8268 KB Output is correct
8 Correct 133 ms 10096 KB Output is correct
9 Correct 138 ms 11036 KB Output is correct
10 Correct 137 ms 11084 KB Output is correct