Submission #473134

#TimeUsernameProblemLanguageResultExecution timeMemory
473134Ahmed_SolymanDoktor (COCI17_doktor)C++14
0 / 100
163 ms7364 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n;cin>>n; vector<ll>arr(n); for(auto &i:arr)cin>>i; ll x=1,y=1; for(ll i=0;i<n;i++){ if(arr[i]!=i+1){ x=arr[i]; break; } } for(ll i=0;i<n;i++){ if(arr[i]!=i+1){ y=arr[i]; } } cout<<x<<" "<<y<<endl; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...