Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <algorithm>
- #include <cstring>
- #include <string>
- #include <cctype>
- #include <stack>
- #include <queue>
- #include <list>
- #include <vector>
- #include <map>
- #include <sstream>
- #include <cmath>
- #include <bitset>
- #include <utility>
- #include <set>
- #include <numeric>
- #define INT_MAX 2147483647
- #define INT_MIN -2147483647
- #define pi acos(-1.0)
- #define N 1000000
- #define LL unsigned long long
- using namespace std;
- int main ()
- {
- int n;
- while ( scanf ("%d", &n) && n ) {
- int a [1422 + 10];
- for ( int i = 0; i < n; i++ ) scanf ("%d", &a [i]);
- sort (a, a + n);
- bool possible = true;
- for ( int i = 1; i < n; i++ )
- if ( a [i] - a [i - 1] > 200 ) possible = false;
- if ( 2 * (1422 - a [n - 1]) > 200 ) possible = false;
- if ( possible ) printf ("POSSIBLE\n");
- else printf ("IMPOSSIBLE\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement