Submission #1188397

#TimeUsernameProblemLanguageResultExecution timeMemory
1188397Haciyev12Utrka (COCI14_utrka)C++20
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long #define pb push_back #define in insert #define F first #define S second #define vll vector<ll> #define all(v) v.begin(), v.end() #define rep(a, b, c) for (int(a) = (b); (a) < (c); (a)++) // i, 0, n #define endl '\n' #define pii pair<ll,ll> #define yes cout << "Yes" << endl; #define no cout << "No" << endl; using namespace std; const ll INF = 1e18, mod = 1e9 + 7, N = 1e5 + 5; ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); } ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; } ll modpow(ll a, ll b) { ll ans = 1; while(b > 0) { if(b % 2 == 1) { ans *= a; ans %= mod; } a *= a; a %= mod; b >>= 1; } return ans % mod; } ll inv(ll a) { return modpow(a, mod-2) % mod; } void solve(){ ll n; cin >> n; string s unordered_map<string ,ll>mp; set<string>st; for(int i = 0; i < 2 * n - 1; i++){ cin >> s; mp[s]++; } for(auto i : mp){ if(i.S == 1){ cout << i.F << endl; return; } } } int main() { fast; ll t = 1; // cin >> t; while(t--){ solve(); } }

Compilation message (stderr)

utrka.cpp: In function 'void solve()':
utrka.cpp:47:5: error: expected initializer before 'unordered_map'
   47 |     unordered_map<string ,ll>mp;
      |     ^~~~~~~~~~~~~
utrka.cpp:50:17: error: 's' was not declared in this scope
   50 |         cin  >> s;
      |                 ^
utrka.cpp:52:9: error: 'mp' was not declared in this scope
   52 |         mp[s]++;
      |         ^~
utrka.cpp:55:18: error: 'mp' was not declared in this scope
   55 |     for(auto i : mp){
      |                  ^~