Submission #713794

# Submission time Handle Problem Language Result Execution time Memory
713794 2023-03-23T04:28:24 Z Dulguun88 Utrka (COCI14_utrka) C++14
80 / 80
144 ms 9876 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    string a[100000], b[100000];
    cin>>n;
    for(int i = 0; i < n; i++) cin>>a[i];
    for(int i = 0; i < n - 1; i++) cin>>b[i];
    sort(a, a + n);
    sort(b, b + n - 1);
    for(int i = 0; i < n; i++)
        if(a[i] != b[i])
        {
            cout<<a[i]<<endl;
            return 0;
        }
    cout<<a[n-1];
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 6484 KB Output is correct
2 Correct 5 ms 6484 KB Output is correct
3 Correct 4 ms 6568 KB Output is correct
4 Correct 5 ms 6588 KB Output is correct
5 Correct 5 ms 6572 KB Output is correct
6 Correct 69 ms 8360 KB Output is correct
7 Correct 100 ms 9188 KB Output is correct
8 Correct 121 ms 9620 KB Output is correct
9 Correct 144 ms 9876 KB Output is correct
10 Correct 135 ms 9776 KB Output is correct