Submission #935486

#TimeUsernameProblemLanguageResultExecution timeMemory
935486qwe1rt1yuiop1Cat Exercise (JOI23_ho_t4)C++14
0 / 100
1 ms452 KiB
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; void solve() { int n; cin >> n; vector<int> v(n); for (int &i : v) cin >> i; for (int i = 1, a, b; i < n; ++i) cin >> a >> b; if (v[0] == n || v.back() == n) cout << "2\n"; else cout << "3\n"; } /* */ signed main() { ios::sync_with_stdio(0); cin.tie(0); solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...