Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- #include <memory.h>
- #include <iterator>
- #include <cassert>
- #include <fstream>
- #include <iomanip>
- #include <cstdlib>
- #include <bitset>
- #include <vector>
- #include <cstdio>
- #include <string>
- #include <queue>
- #include <deque>
- #include <cmath>
- #include <ctime>
- #include <stack>
- #include <set>
- #include <map>
- using namespace std;
- const int N = (int)2e5 + 10;
- int n;
- long long a[N];
- int main ()
- {
- //freopen("input.txt" , "r" , stdin);
- //freopen("output.txt" , "w" , stdout);
- ios_base::sync_with_stdio(false);
- cin >> n;
- long long timeD = -1;
- for(int i = 0; i < n; ++i) {
- cin >> a[i];
- }
- timeD = a[1] - a[0];
- for(int i = 1; i < n; ++i) {
- if(timeD != a[i] - a[i - 1]) {
- cout << "kukuha" << endl;
- return 0;
- }
- }
- long double d = timeD * (n - 1) * 1.0;
- cout << (d - 1) / 2.0 << ' ' << (d + 1) / 2.0 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement