-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path9a.cpp
More file actions
30 lines (28 loc) · 643 Bytes
/
9a.cpp
File metadata and controls
30 lines (28 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <set>
using namespace std;
typedef long long ll;
ll previous=25;//cout<<" "<<*max_element(numeros.begin(), numeros.end())+*min_element(numeros.begin(), numeros.end())<<endl;
int main(){
vector<ll> lista;
ll dato;
while(cin>>dato){
lista.push_back(dato);
}
for(int i=0;i<lista.size()-previous;i++){
set<ll> sumas;
for(int y=i; y<previous+i;y++){
for(int j=y+1; j<previous+i;j++){
ll suma= lista[y]+lista[j];
sumas.insert(suma);
}
}
if(sumas.find(lista[previous+i])==sumas.end()){
cout<<lista[previous+i]<<endl;
break;
}
}
}