CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 19:40:38 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=1369e0e53d233b8f61d2e2f1a88f55a8af75b416c2b06bbdcb0c6c724e8e75dea%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22k-nFPYLYUkN7Sq-rKhS1s5ns3Rl-p_k6%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d911f29afa1f95-BLR
#include <iostream>#include <vector>#include <map>#include <bits/stdc++.h> - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <map>
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define cy cout << "YES"
- #define cn cout << "NO"
- #define nl "\n"
- #define fi first
- #define se second
- #define MOD 1000000007
- #define all(v) v.begin(), v.end()
- #define sz(s) s.size()
- #define f0r(i, n) for (ll i = 0; i < n; i++)
- template <typename T = int>
- istream &operator>>(istream &in, vector<T> &v)
- {
- for (auto &x : v)
- in >> x;
- return in;
- }
- template <typename T = int>
- ostream &operator<<(ostream &out, const vector<T> &v)
- {
- for (const T &x : v)
- out << x << " ";
- return out;
- }
- void sherry()
- {
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- {
- sherry();
- ll t;
- cin >> t;
- vector<ll> v(1e5 + 5);
- v[1] = 0, v[2] = 1;
- for (int i = 3; i < 1e5 + 5; i++)
- {
- v[i] = v[i - 1] % MOD + v[i - 2] % MOD;
- }
- while (t--)
- {
- ll l, r;
- cin >> l >> r;
- cout << v[r] % MOD - v[l] % MOD << nl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
π‘ EASY MONEY GUIDE β
Working
JavaScript | 6 sec ago | 0.24 KB
-
βββMAKE $900 INSTANTLYββ
Java | 15 sec ago | 0.10 KB
-
π₯ Exchange profit method
JavaScript | 15 sec ago | 0.24 KB
-
π Swapzone +37% glitch β 5
JavaScript | 20 sec ago | 0.25 KB
-
π΅ Make 3000$ in 20 minutes π΅
JavaScript | 25 sec ago | 0.24 KB
-
π‘ Instant BTC Profit Method β
Working
JavaScript | 34 sec ago | 0.24 KB
-
π MAKE $2500 IN 15 MIN β
Working
JavaScript | 44 sec ago | 0.24 KB
-
π Swapzone +37% glitch
JavaScript | 53 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand