Language: C++

ｖ#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define REP(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) std::cout << x << '\n'
#define all(a) a.begin(), a.end()
#define pb push_back
#define sz(x) ((int)(x).size())
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; }
const int dx[4] = { 1, 0, -1,  0 };
const int dy[4] = { 0, 1,  0, -1 };
const int INF = (int)1e9;
const ll  inf = (ll)1e18;
const int mod = 1000000007;
const int MAX_N = 100010;
const double PI = acos(-1);

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(10);
	/*------------------------------*/
	
	//eratos
	const int MAX = 100010;
	vector<int> is_prime(MAX, 1);
	is_prime[0] = 0, is_prime[1] = 0;
	for (int i = 2; i < MAX; i++) {
		if (!is_prime[i]) continue;
		for (int j = i * 2; j < MAX; j += i) {
			is_prime[j] = 0;
		}
	}

	//2017-like
	vector<int> a(MAX, 0);
	for (int i = 0; i < MAX; i++) {
		if (i % 2 == 0) continue;
		if (is_prime[i] && is_prime[(i + 1) / 2]) {
			a[i] = 1;
		}
	}

	//累積和
	vector<int> s(MAX + 1, 0);
	for (int i = 0; i < MAX; i++) {
		s[i + 1] = s[i] + a[i];
	}

	int q;
	cin >> q;
	rep(i, q) {
		int l, r;
		cin >> l >> r;
		cout << s[r + 1] - s[l] << endl;
	}

	return 0;
}

Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | ｖ#include "bits/stdc++.h"
      |   ^
a.cc:1:1: error: '\U0000ff56' does not name a type
    1 | ｖ#include "bits/stdc++.h"
      | ^~
a.cc:5:9: error: 'vector' does not name a type
    5 | typedef vector<ll> vl;
      |         ^~~~~~
a.cc:6:9: error: 'vector' does not name a type
    6 | typedef vector<vector<ll>> vvl;
      |         ^~~~~~
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<ll, ll> P;
      |         ^~~~
a.cc:24:19: error: 'acos' was not declared in this scope
   24 | const double PI = acos(-1);
      |                   ^~~~
a.cc: In function 'int main()':
a.cc:27:9: error: 'cin' was not declared in this scope
   27 |         cin.tie(0);
      |         ^~~
a.cc:28:9: error: 'ios' has not been declared
   28 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:29:9: error: 'cout' was not declared in this scope; did you mean 'out'?
   29 |         cout << fixed << setprecision(10);
      |         ^~~~
      |         out
a.cc:29:17: error: 'fixed' was not declared in this scope
   29 |         cout << fixed << setprecision(10);
      |                 ^~~~~
a.cc:29:26: error: 'setprecision' was not declared in this scope
   29 |         cout << fixed << setprecision(10);
      |                          ^~~~~~~~~~~~
a.cc:34:9: error: 'vector' was not declared in this scope
   34 |         vector<int> is_prime(MAX, 1);
      |         ^~~~~~
a.cc:34:16: error: expected primary-expression before 'int'
   34 |         vector<int> is_prime(MAX, 1);
      |                ^~~
a.cc:35:9: error: 'is_prime' was not declared in this scope
   35 |         is_prime[0] = 0, is_prime[1] = 0;
      |         ^~~~~~~~
a.cc:44:16: error: expected primary-expression before 'int'
   44 |         vector<int> a(MAX, 0);
      |                ^~~
a.cc:48:25: error: 'a' was not declared in this scope
   48 |                         a[i] = 1;
      |                         ^
a.cc:53:16: error: expected primary-expression before 'int'
   53 |         vector<int> s(MAX + 1, 0);
      |                ^~~
a.cc:55:17: error: 's' was not declared in this scope
   55 |                 s[i + 1] = s[i] + a[i];
      |                 ^
a.cc:55:35: error: 'a' was not declared in this scope
   55 |                 s[i + 1] = s[i] + a[i];
      |                                   ^
a.cc:63:25: error: 's' was not declared in this scope
   63 |                 cout << s[r + 1] - s[l] << endl;
      |                         ^
a.cc:63:44: error: 'endl' was not declared in this scope
   63 |                 cout << s[r + 1] - s[l] << endl;
      |                                            ^~~~