Submission #1129486

#TimeUsernameProblemLanguageResultExecution timeMemory
1129486stdfloatLove Polygon (BOI18_polygon)C++20
0 / 100
1 ms836 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; if (n & 1) return cout << -1, 0; vector<int> pr(n); map<string, int> m; for (int i = 0; i < n; i++) { string s, t; cin >> s >> t; if (m.find(s) == m.end()) m[s] = (int)m.size(); if (m.find(t) == m.end()) m[t] = (int)m.size(); assert(s == t); pr[m[s]] = m[t]; } cout << n; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...