silly_bea#include <iostream>#include <cmath>#include <algorithm>#include <cctype>#include <cstdio>#include <cstring>#include <bitset>#include <string>#include <set>#include <deque>#include <queue>#include <stack>#include <vector>#include <map>#include <unordered_set>#define ll long long#define ld long double#define db double#define ch char#define sg string#define st set#define stck stack#define pq priority_queue#define dq deque#define vc vector#define bl bool#define mp map#define cp cout.precision#define ts to_string#define mst multiset#define uost unordered_setusing namespace std;int main(){ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);ll n,num;bl lost=false,isLost[2000001];scanf("%lld",&n);memset(isLost,true,sizeof(isLost)); //all pencils are lost firstfor(int i=0;i<n;i++){scanf("%lld",&num);isLost[num]=false; //we saw that pencil so it is not lost.}for(int i=1;i<=n;i++){if(isLost[i]) //if pencil with index i is lost{printf("%d",i); //then output itlost=true; //and we found lost pencil so not all pencils are presentbreak;}}if(!lost){printf("-1"); //if no absent pencil is found then all are present}}ver_474