Language: C++

#pragma GCC optimize("0fast")
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define dunk(a) cout << (a) << endl
using namespace std;
typedef long long ll;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	string S;
	cin >> S;
	vector<int> sum(n);
	int cnt_migi = 0;
	int cnt_hidari = 0;
	rep(i, n) {
		if (S[i] == 'E') cnt_migi++;
	}

	int ans = 1000000007;
	rep(i, n) {
		if (S[i] == 'E') cnt_migi--;
		ans = min(ans, cnt_migi + cnt_hidari);
		if (S[i] == 'W') cnt_hidari++;
	}

	dunk(ans);

	return 0;
}

Compiler output:
a.cc:1:29: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
    1 | #pragma GCC optimize("0fast")
      |                             ^
In file included from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:2:
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:321:29: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  321 |   inline void __terminate() _GLIBCXX_USE_NOEXCEPT
      |                             ^~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h: In function 'void std::__terminate()':
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:323:82: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  323 |     void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__,__cold__));
      |                                                                                  ^
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:323:82: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h: At global scope:
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:543:29: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  543 |   __is_constant_evaluated() _GLIBCXX_NOEXCEPT
      |                             ^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:582:3: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  582 |   _GLIBCXX_NOEXCEPT;
      |   ^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:582:3: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:608:25: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  608 |   __glibcxx_assert_fail()
      |                         ^
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683:
/usr/include/assert.h:71:45: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
   71 |      __THROW __attribute__ ((__noreturn__)) __COLD;
      |                                             ^~~~~~
/usr/include/assert.h:71:45: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/assert.h:76:45: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
   76 |      __THROW __attribute__ ((__noreturn__)) __COLD;
      |                                             ^~~~~~
/usr/include/assert.h:76:45: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/assert.h:82:45: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
   82 |      __THROW __attribute__ ((__noreturn__)) __COLD;
      |                                             ^~~~~~
/usr/include/assert.h:82:45: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:35:
/usr/include/ctype.h:80:40: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
   80 |      __THROW __attribute__ ((__const__));
      |                                        ^
/usr/include/ctype.h:80:40: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:82:40: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
   82 |      __THROW __attribute__ ((__const__));
      |                                        ^
/usr/include/ctype.h:82:40: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:84:40: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
   84 |      __THROW __attribute__ ((__const__));
      |                                        ^
/usr/include/ctype.h:84:40: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:108:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  108 | __exctype (isalnum);
      | ^~~~~~~~~
/usr/include/ctype.h:108:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:109:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  109 | __exctype (isalpha);
      | ^~~~~~~~~
/usr/include/ctype.h:109:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:110:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  110 | __exctype (iscntrl);
      | ^~~~~~~~~
/usr/include/ctype.h:110:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:111:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  111 | __exctype (isdigit);
      | ^~~~~~~~~
/usr/include/ctype.h:111:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:112:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  112 | __exctype (islower);
      | ^~~~~~~~~
/usr/include/ctype.h:112:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:113:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  113 | __exctype (isgraph);
      | ^~~~~~~~~
/usr/include/ctype.h:113:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:114:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  114 | __exctype (isprint);
      | ^~~~~~~~~
/usr/include/ctype.h:114:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:115:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  115 | __exctype (ispunct);
      | ^~~~~~~~~
/usr/include/ctype.h:115:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:116:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  116 | __exctype (isspace);
      | ^~~~~~~~~
/usr/include/ctype.h:116:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:117:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  117 | __exctype (isupper);
      | ^~~~~~~~~
/usr/include/ctype.h:117:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:118:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  118 | __exctype (isxdigit);
      | ^~~~~~~~~
/usr/include/ctype.h:118:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:122:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  122 | extern int tolower (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:122:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:125:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  125 | extern int toupper (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:125:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:130:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  130 | __exctype (isblank);
      | ^~~~~~~~~
/usr/include/ctype.h:130:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:135:42: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  135 | extern int isctype (int __c, int __mask) __THROW;
      |                                          ^~~~~~~
/usr/include/ctype.h:135:42: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:142:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  142 | extern int isascii (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:142:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:146:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  146 | extern int toascii (int __c) __THROW;
      |                              ^~~~~~~
/usr/include/ctype.h:146:30: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:150:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  150 | __exctype (_toupper);
      | ^~~~~~~~~
/usr/include/ctype.h:150:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:151:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  151 | __exctype (_tolower);
      | ^~~~~~~~~
/usr/include/ctype.h:151:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:251:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  251 | __exctype_l (isalnum_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:251:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/include/ctype.h:252:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
  252 | __exctype_l (isalpha_l);
      | ^~~~~~~~~~~
/usr/include/ctype.h:252:1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
/usr/inc