Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <cstring>

using namespace std;

#define REP(i,n) for(int i = 0; i < n; i++)
#define RREP(i,n) for(int i = n - 1; i >= 0; i--)

#define ALL(v) v.begin(),v.end()
#define pb push_back
#define mp make_pair
#define F first
#define S second

#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

#define y0 y3487465
#define y1 y8687969

#define m0(x) memset(x,0,sizeof(x))
#define m1(x) memset(x,63,sizeof(x))

typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pi> vpi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

double EPS = 1e-9;
int INFi = 1000000005;
long long INFll = 1000000000000000005ll;
double PI = acos(-1);
int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};
ll MOD = 1000000007;

const int MAX_N = 100000;
int n, l;
int a[MAX_N];
 
int main(){
  cin >> n >> l;
  REP(i, n) cin >> a[i];
 
  int x = n;
  REP(i, n - 1) {
    if(a[i] + a[i + 1] >= l) {
      x = i;
      break;
    }
  }
 
  if(x == n) {
    cout << "Impossible" << endl;
  } else {
    cout << "Possible" << endl;
    REP(i, x) cout << i + 1 << " " << endl;
    REP(i, n - 1 - x) cout << n - 1 - i << " " << endl;
  }
 
  return 0;
}
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <map>
#include <deque>
#include <string.h>
using namespace std;

#define REP(i,n) for(int i = 0; i < n; i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pi> vpi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

double EPS = 1e-9;
int INFi = 1000000005;
long long INFll = 1000000000000000005ll;
double PI = acos(-1);
int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};
ll MOD = 1000000007;

const int MAX_N = 100000;
int n, l;
int a[MAX_N];

int main(){
  cin >> n >> l;
  REP(i, n) cin >> a[i];

  int x = n;
  REP(i, n - 1) {
    if(a[i] + a[i + 1] >= l) {
      x = i;
      break;
    }
  }

  if(x == n) {
    cout << "Impossible" << endl;
  } else {
    cout << "Possible" << endl;
    REP(i, x) cout << i + 1 << " " << endl;
    REP(i, n - 1 - x) cout << n - 1 - i << " " << endl;
  }

  return 0;
}


Compiler output:
a.cc:97:8: error: redefinition of 'double EPS'
   97 | double EPS = 1e-9;
      |        ^~~
a.cc:40:8: note: 'double EPS' previously defined here
   40 | double EPS = 1e-9;
      |        ^~~
a.cc:98:5: error: redefinition of 'int INFi'
   98 | int INFi = 1000000005;
      |     ^~~~
a.cc:41:5: note: 'int INFi' previously defined here
   41 | int INFi = 1000000005;
      |     ^~~~
a.cc:99:11: error: redefinition of 'long long int INFll'
   99 | long long INFll = 1000000000000000005ll;
      |           ^~~~~
a.cc:42:11: note: 'long long int INFll' previously defined here
   42 | long long INFll = 1000000000000000005ll;
      |           ^~~~~
a.cc:100:8: error: redefinition of 'double PI'
  100 | double PI = acos(-1);
      |        ^~
a.cc:43:8: note: 'double PI' previously defined here
   43 | double PI = acos(-1);
      |        ^~
a.cc:101:5: error: redefinition of 'int dirx [8]'
  101 | int dirx[8] = {-1,0,0,1,-1,-1,1,1};
      |     ^~~~
a.cc:44:5: note: 'int dirx [8]' previously defined here
   44 | int dirx[8] = {-1,0,0,1,-1,-1,1,1};
      |     ^~~~
a.cc:102:5: error: redefinition of 'int diry [8]'
  102 | int diry[8] = {0,1,-1,0,-1,1,-1,1};
      |     ^~~~
a.cc:45:5: note: 'int diry [8]' previously defined here
   45 | int diry[8] = {0,1,-1,0,-1,1,-1,1};
      |     ^~~~
a.cc:103:4: error: redefinition of 'll MOD'
  103 | ll MOD = 1000000007;
      |    ^~~
a.cc:46:4: note: 'll MOD' previously defined here
   46 | ll MOD = 1000000007;
      |    ^~~
a.cc:105:11: error: redefinition of 'const int MAX_N'
  105 | const int MAX_N = 100000;
      |           ^~~~~
a.cc:48:11: note: 'const int MAX_N' previously defined here
   48 | const int MAX_N = 100000;
      |           ^~~~~
a.cc:106:5: error: redefinition of 'int n'
  106 | int n, l;
      |     ^
a.cc:49:5: note: 'int n' previously declared here
   49 | int n, l;
      |     ^
a.cc:106:8: error: redefinition of 'int l'
  106 | int n, l;
      |        ^
a.cc:49:8: note: 'int l' previously declared here
   49 | int n, l;
      |        ^
a.cc:107:5: error: redefinition of 'int a [100000]'
  107 | int a[MAX_N];
      |     ^
a.cc:50:5: note: 'int a [100000]' previously declared here
   50 | int a[MAX_N];
      |     ^
a.cc:109:5: error: redefinition of 'int main()'
  109 | int main(){
      |     ^~~~
a.cc:52:5: note: 'int main()' previously defined here
   52 | int main(){
      |     ^~~~