output stringlengths 52 181k | instruction stringlengths 296 182k |
|---|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
long long a, b;
cin >> a >> b;
cout << b * 2 << endl;
}
return 0;
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
scanf("%d", &t);
while (t--) {
int n, x;
scanf("%d %d", &n, &x);
printf("%d\n", 2 * x);
}
}
| ### Prompt
Please create a solution in cpp to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 200;
const long long LIM = N;
const long long MOD = 1e9 + 7;
long long n, x, Q;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> Q;
while (Q--) {
cin >> n >> x;
cout << x * 2 << "\n";
}
return 0;
}
| ### Prompt
Develop a solution in Cpp to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int findquery(int n, int x) { return 2 * x; }
int main() {
int t;
cin >> t;
int a[t];
for (int i = 0; i < t; i++) {
int n, x;
cin >> n >> x;
a[i] = findquery(n, x);
}
for (int j = 0; j < t; j++) {
cout << a[j] << endl;
}
}
| ### Prompt
Please formulate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
const int mod = 1e9 + 7;
const ll inf = 2e9;
const int N = 1e5 + 10;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--) {
ll n, x;
cin >> n >> x;
cout << 2 * x << '\n';
... | ### Prompt
Please provide a CPP coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
int x;
cin >> x;
if (n < (x * 2)) {
cout << n << "\n";
} else {
cout << x * 2 << "\n";
}
}
}
| ### Prompt
In Cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int t;
cin >> t;
while (t--) {
long long int n, k;
cin >> n >> k;
cout << k * 2 << endl;
}
}
| ### Prompt
Generate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int j = 0; j < t; j++) {
long long n, x;
cin >> n >> x;
long long ans;
ans = 2 * x;
cout << ans << "\n";
}
return 0;
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
bool Is_Prime(long long n) {
if (n == 1)
return false;
else {
for (int i = 2; i <= sqrt(n); i++) {
if (n % i == 0) return false;
}
}
return true;
}
bool Is_Vowel(char c) {
string s = "aeiouAEIOU";
for (unsigned int i = 0; i < s.size(); i++) {
... | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
void solve() {
long long x, n;
cin >> x >> n;
long long ans = 2 * n;
cout << ans << endl;
}
int main() {
int t;
cin >> t;
while (t--) {
solve();
}
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int i = 0; i < t; i++) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
cin.ignore(2);
return 0;
}
| ### Prompt
Please provide a cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
const int inf = 0x3f3f3f3f;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
long long t;
cin >> t;
while (t--) {
long long n, x;
cin >> n >> x;
cout << 2ll * x << endl;
}
return 0;
}
| ### Prompt
In Cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int MNOGO = 2e9;
const long long MD = 1e9 + 7;
const double EPS = 1e-7;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
;
auto t = new int();
cin >> *t;
while ((*t)--) {
auto n = new int(0);
cin ... | ### Prompt
Create a solution in CPP for the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the ... |
#include <bits/stdc++.h>
int main(int argc, char** argv) {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie(0);
int T;
std::cin >> T;
for (int j = 0; j < T; j++) {
int n, x;
std::cin >> n >> x;
std::cout << 2 * x << std::endl;
}
return 0;
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, a, x, k;
cin >> k;
for (int i = 1; i <= k; i++) {
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Construct a CPP code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int T, x, n;
cin >> T;
while (T--) {
cin >> n >> x;
cout << 2 * x << endl;
}
}
| ### Prompt
Please formulate a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
int a[t], x[t];
for (int i = 0; i < t; i++) {
cin >> a[i] >> x[i];
}
for (int i = 0; i < t; i++) cout << 2 * x[i] << endl;
}
| ### Prompt
Please create a solution in CPP to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long t, n, x;
cin >> t;
for (int i = 0; i < t; i++) {
cin >> n >> x;
cout << 2 * x;
cout << endl;
}
return 0;
}
| ### Prompt
Develop a solution in cpp to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int t, n, x;
int main() {
cin >> t;
for (int i = 1; i <= t; i++) {
cin >> n >> x;
cout << x * 2 << endl;
}
return 0;
}
| ### Prompt
Generate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long powmod(long long a, long long b, long long mod) {
long long sum = 1;
while (b) {
if (b & 1) {
sum = (sum *... | ### Prompt
Develop a solution in CPP to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int i = 0; i < t; i++) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
}
| ### Prompt
Construct a cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int i = 0; i < t; i++) {
int n, m;
cin >> n >> m;
cout << 2 * m << endl;
}
}
| ### Prompt
Please provide a CPP coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int T;
cin >> T;
for (int tt = 0; tt < T; tt++) {
int n, x;
cin >> n >> x;
cout << x * 2 << endl;
}
return 0;
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
namespace std {
bool __LOG_ = false;
const int N = 200002;
const int logN = 20;
const int MOD7 = 1000000007;
const long long MOD9 = 998244353;
const long long MODL = 1000000007;
const int INF = 1000000007;
const long long INFL = 4ll * 1000000007ll * 1000000007ll;
const long double PI = acos(-1)... | ### Prompt
Create a solution in Cpp for the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the ... |
#include <bits/stdc++.h>
using namespace std;
int T;
int main() {
scanf("%d", &T);
while (T--) {
int N, X;
scanf("%d%d", &N, &X);
printf("%d\n", 2 * X);
}
}
| ### Prompt
Your task is to create a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int _ = 0; _ < t; _++) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Please formulate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int T;
int x, n;
int main() {
scanf("%d", &T);
for (int cas = (0); cas < (T); cas++) {
scanf("%d%d", &n, &x);
printf("%d\n", x * 2);
}
return 0;
}
| ### Prompt
Your task is to create a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while (t--) {
int n, k;
cin >> n >> k;
cout << 2 * k << endl;
}
return 0;
}
| ### Prompt
Please create a solution in Cpp to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
long long n, k;
cin >> t;
while (t--) {
cin >> n >> k;
cout << 2 * k << endl;
}
return 0;
}
| ### Prompt
In cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long t, n, r;
cin >> t;
while (t--) {
cin >> n >> r;
cout << 2 * r << endl;
}
return 0;
}
| ### Prompt
Develop a solution in Cpp to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, x, t;
cin >> t;
while (t--) {
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Your challenge is to write a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
void solve() {
long long int n, m, d, a = 0, b = 0, c = 0, x, y, z, r, count = 0, i, j, k,
sum = 0, ans = 0, l, xx, sign = 1;
cin >> n >> x;
cout << x * 2 << "\n";
}
void fast() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int main... | ### Prompt
Your task is to create a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 10;
const long long INF = 1e18;
const long long inf = -1e18;
const long long MOD = 1e9 + 7;
int binpow(int a, int n) {
if (n == 0) return 1;
if (n % 2 == 1)
return binpow(a, n - 1) * a;
else {
int b = binpow(a, n / 2);
return b * ... | ### Prompt
In CPP, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int i = 1; i <= t; ++i) {
int a, b;
cin >> a >> b;
cout << 2 * b << "\n";
}
}
| ### Prompt
Create a solution in cpp for the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the ... |
#include <bits/stdc++.h>
using namespace std;
long long x, n, t;
int main() {
cin >> t;
while (t--) {
cin >> x >> n;
cout << 2 * n << endl;
}
return ~~(0 ^ 0 ^ 0);
}
| ### Prompt
Your challenge is to write a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
long long t = 1;
cin >> t;
while (t--) {
long long n, x;
cin >> n >> x;
cout << 2 * x << "\n";
}
return 0;
}
| ### Prompt
Construct a CPP code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
long long q;
cin >> q;
while (q--) {
long long n, x;
cin >> n >> x;
cout << x * 2 << '\n';
}
return 0;
}
| ### Prompt
Construct a cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long int t;
cin >> t;
while (t--) {
long int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Generate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
int t;
int n, x;
int main() {
cin >> t;
for (int i = 1; i <= t; ++i) {
cin >> n >> x;
cout << x * 2 << endl;
}
return 0;
}
| ### Prompt
Develop a solution in CPP to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
long double const PI = acosl(-1);
const long long INF = 1e18 + 123;
const int N = 5e5 + 123;
const long long MOD = 998244353;
const long double EPS = 0;
long long a[N];
long long b[N];
void solve() {
long long n;
int x;
cin >> n >> x;
cout << x * 2;
cout << "\n";
... | ### Prompt
Construct a CPP code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
const long long int infP = 1e18;
void solve() {
long long int n, x;
cin >> n >> x;
cout << 2 * x << "\n";
}
void debug(long long int tt) {}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
cin >> t;
w... | ### Prompt
Develop a solution in cpp to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
template <class A>
void pr(A a) {
cout << a;
cout << '\n';
}
template <class A, class B>
void pr(A a, B b) {
cout << a << ' ';
pr(b);
}
template <class A, class B, class C>
void pr(A a, B b, C c) {
cout << a << ' ';
pr(b, c);
}
template <class A, class B, class ... | ### Prompt
Construct a Cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int i, j, n, c = 0, x, t;
cin >> t;
for (i = 0; i < t; i++) {
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Your task is to create a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int T, x;
int main() {
scanf("%d", &T);
while (T--) {
scanf("%d%d", &x, &x);
printf("%d\n", x * 2);
}
return 0;
}
| ### Prompt
In cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, p;
cin >> n >> p;
cout << 2 * p << endl;
}
return 0;
}
| ### Prompt
Please create a solution in CPP to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long long T, n, x;
cin >> T;
for (int i = 0, ThxDem = T; i < ThxDem; i++) {
cin >> n >> x;
cout << x * 2 << endl;
}
return 0;
}
| ### Prompt
Construct a CPP code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
namespace fastIO {
inline int read() {
char c = getchar();
int x = 0, f = 1;
while (c < '0' || c > '9') {
if (c == '-') f = -1;
c = getchar();
}
while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
return x * f;
}
} // namespace fastIO
using namespace fastIO;
u... | ### Prompt
Please formulate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int t, n, x;
int main() {
for (cin >> t; t--;) cin >> n >> x, cout << x * 2 << endl;
}
| ### Prompt
Please formulate a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
void solve() {
long long n, x;
cin >> n >> x;
cout << 2 * x << '\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
;
int t = 1;
cin >> t;
while (t--) {
solve();
}
return 0;
}
| ### Prompt
In Cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int T, n, x;
int main() {
scanf("%d", &T);
while (T--) {
scanf("%d%d", &n, &x);
printf("%d\n", 2 * x);
}
return 0;
}
| ### Prompt
Generate a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t, n, x;
scanf("%d", &t);
for (int test = 1; test <= t; test++) {
scanf("%d%d", &n, &x);
printf("%d\n", x * 2);
}
return 0;
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << 2 * x * 1ull << '\n';
}
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(T &x) {
x = 0;
int f = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {
f |= (ch == '-'), ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
}
return x = f ... | ### Prompt
Please formulate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long N = 2e5 + 5;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long long te;
cin >> te;
while (te--) {
long long n, x;
cin >> n >> x;
cout << 2 * x << "\n";
}
return 0;
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
int a, s;
scanf("%d%d", &a, &s);
printf("%d\n", s * 2);
}
return 0;
}
| ### Prompt
Develop a solution in cpp to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
;
int T;
cin >> T;
while (T--) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Please formulate a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long t;
cin >> t;
for (long long i = 0; i < t; i++) {
long long x;
long long y;
cin >> x >> y;
cout << y * 2 << endl;
}
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Generate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
long long n, x;
while (t--) {
cin >> n >> x;
cout << x * 2 << "\n";
}
return 0;
}
| ### Prompt
Please create a solution in Cpp to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t, n, x;
cin >> t;
for (int i = 0; i < t; i++) {
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Create a solution in cpp for the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the ... |
#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
inline long long int modpw(long long int x, long long int y, long long int z) {
long long int res = 1;
x = x % z;
while (y) {
if (y & 1) res = (res * x) % z;
x = (x * x) % z;
y /= 2;
}
return res;
}
int main() {
ios_base::syn... | ### Prompt
Please formulate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
cin >> T;
long long x, n;
for (int i = 1; i <= T; i++) {
cin >> x >> n;
cout << n * 2 << endl;
}
return 0;
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
unsigned long long t;
int main() {
const int INF = 2147483647;
cin >> t;
for (unsigned long long i = 0; i < t; ++i) {
unsigned long long n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Construct a CPP code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
inline int read() {
int v = 0, c = 1;
char ch = getchar();
while (!isdigit(ch)) {
if (ch == '-') c = -1;
ch = getchar();
}
while (isdigit(ch)) {
v = v * 10 + ch - 48;
ch = getchar();
}
return v * c;
}
int main() {
int T = read();
while (T--... | ### Prompt
Please provide a cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using ll = long long;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Generate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
int main() {
long long int t, n, k, i;
scanf("%lld", &t);
for (i = 0; i < t; i++) {
scanf("%lld %lld", &n, &k);
printf("%lld\n", 2 * k);
}
}
| ### Prompt
Please formulate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
for (int i = 0; i < t; i++) {
int a, b;
cin >> a >> b;
cout << b * 2 << '\n';
}
return 0;
}
| ### Prompt
In Cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int t;
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
}
| ### Prompt
In Cpp, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int q;
cin >> q;
while (q--) {
int x, y;
cin >> x >> y;
cout << 1 + y + (y - 1) << endl;
}
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int T, n, x;
cin >> T;
for (int i = 1; i <= T; i++) {
cin >> n >> x;
cout << 2 * x << "\n";
}
return 0;
}
| ### Prompt
Please create a solution in CPP to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for (int i = 0; i < t; i++) {
long long n, x;
cin >> n >> x;
x *= 2;
cout << x << endl;
}
return 0;
}
| ### Prompt
Your challenge is to write a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
scanf("%d", &t);
while (t--) {
int n, x;
scanf("%d %d", &n, &x);
printf("%d\n", x * 2);
}
}
| ### Prompt
Construct a cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long t;
cin >> t;
while (t--) {
long n, x;
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, i;
cin >> n;
unsigned long long int ar[n * 2];
for (i = 0; i < n * 2; i = i + 2) {
cin >> ar[i] >> ar[i + 1];
cout << ar[i + 1] * 2 << "\n";
}
}
| ### Prompt
Generate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
long long po(long long a, long long b, long long M) {
long long res = 1;
a = a % M;
while (b) {
if (b % 2) res = (res * a) % M;
b /= 2;
a = (a * a) % M;
}
return res;
}
long long pw(long long x, long long y) {
if (y == 0)
return 1;
else if (y %... | ### Prompt
Construct a cpp code solution to the problem outlined:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe t... |
#include <bits/stdc++.h>
using namespace std;
int N, T, X;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> T;
while (T--) {
cin >> N >> X;
cout << 2 * X << endl;
}
return 0;
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
int main() {
int T;
long long n, x;
scanf("%d", &T);
while (T--) {
scanf("%lld%lld", &n, &x);
printf("%lld\n", 2 * x);
}
}
| ### Prompt
Develop a solution in CPP to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
long long n, a, b;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a >> b;
cout << 2 * b << '\n';
}
}
| ### Prompt
Generate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int T, n, a;
scanf("%d", &T);
for (int i = 1; i <= T; i++) {
scanf("%d%d", &n, &a);
printf("%d\n", a * 2);
}
return 0;
}
| ### Prompt
Please provide a cpp coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
void solve();
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << fixed;
cout.precision(12);
solve();
return 0;
}
template <typename T>
void prv(vector<T> v) {
for (int __ii = 0; __ii < ((int)v.size()); __ii++) {
if (__ii) cout << ' ';
cou... | ### Prompt
Please formulate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
const long long mod = 1e9 + 7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
long long n, k;
void solve() {
cin >> n >> k;
cout << 2 * k << "\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);... | ### Prompt
Please formulate a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << x * 2 << endl;
}
}
| ### Prompt
Generate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the wh... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << x * 2 << endl;
}
return 0;
}
| ### Prompt
Please provide a CPP coded solution to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
int main(void) {
int n;
std::cin >> n;
while (n--) {
int a, t;
std::cin >> a >> t;
std::cout << t * 2 << '\n';
}
}
| ### Prompt
Create a solution in CPP for the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the ... |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--) {
int n, x;
cin >> n >> x;
cout << x * 2 << "\n";
}
return 0;
}
| ### Prompt
Please create a solution in CPP to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t = 0;
long long n, x;
cin >> t;
for (int i = 1; i <= t; i++) {
cin >> n >> x;
cout << x * 2 << "\n";
}
return 0;
}
| ### Prompt
Develop a solution in CPP to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a[200005], even = 0, odd = 0, i, l, h;
int s[200005];
cin >> n;
for (i = 0; i < n; i++) {
cin >> l >> h;
cout << h * 2 << endl;
}
}
| ### Prompt
Your task is to create a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long MAXN = 100 * 1000 + 10;
long long t;
long long n, k;
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> t;
while (t--) {
cin >> n >> k;
cout << k * 2 << '\n';
}
ret... | ### Prompt
Your challenge is to write a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
long long int bg = 998244353;
long long int gcd(long long int a, long long int b) {
if (b == 0)
return a;
else
return gcd(b, a % b);
}
long long int power(long long int x, long long int y, long long int p) {
if (x == 0) return 0;
if (y == 0) return 1;
long... | ### Prompt
In CPP, your task is to solve the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the... |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
const int inf = 0x3f3f3f3f;
int n, a[maxn];
int main() {
ios::sync_with_stdio(false);
int t;
cin >> t;
while (t--) {
long long x, y;
cin >> x >> y;
cout << y * 2 << endl;
}
}
| ### Prompt
Your challenge is to write a CPP solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
const int AKA = 1e6 + 6;
int arr[AKA];
int arr1[AKA];
int SD() {
int i;
scanf("%d", &i);
return i;
}
long long SLL() {
long long i;
scanf("%lld", &i);
return i;
}
void watchset_e(set<int> SET, int N) {
set<int>::iterator ITERATOR = SET.begin();
advance(ITERA... | ### Prompt
Create a solution in CPP for the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wipe the ... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int T, n, x, temp, j, k;
cin >> T;
for (int i = 0; i < T; i++) {
cin >> n >> x;
cout << x * 2 << endl;
}
return 0;
}
| ### Prompt
Your challenge is to write a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long t;
cin >> t;
while (t--) {
long long n, x;
cin >> n >> x;
cout << x * 2 << endl;
}
}
| ### Prompt
Please formulate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
void solve() {
long long n, k;
cin >> n >> k;
cout << k * 2;
}
int main() {
int t = 1;
cin >> t;
while (t--) {
solve();
cout << endl;
}
return 0;
}
| ### Prompt
Develop a solution in cpp to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
long long t;
cin >> t;
for (long long _ = (0); _ < (t); _++) {
long long n, x;
cin >> n >> x;
cout << 2 * x << '\n';
}
return 0;
}
| ### Prompt
Please create a solution in cpp to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
long double PI = 3.141592653589793238462643383279502884197;
using namespace std;
int main() {
int t, a, b;
scanf("%d", &t);
while (t--) {
scanf("%d %d", &a, &b);
printf("%d\n", 2 * b);
}
return 0;
}
| ### Prompt
Your task is to create a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). Y... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int tt;
cin >> tt;
while (tt--) {
long a, b;
cin >> a >> b;
cout << 2 * b << "\n";
}
}
| ### Prompt
Please formulate a cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, t;
cin >> t;
while (t--) {
cin >> n >> x;
cout << 2 * x << endl;
}
return 0;
}
| ### Prompt
Please create a solution in CPP to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int t;
cin >> t;
while (t--) {
long long int n, x;
cin >> n >> x;
x = x * 2;
cout << x << endl;
}
return (0);
}
| ### Prompt
Develop a solution in CPP to the problem described below:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
#include <bits/stdc++.h>
using namespace std;
const int BUF = 1000000;
char buf[BUF], *p1, *p2;
inline char getChar() {
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, BUF, stdin), p1 == p2)
? EOF
: *p1++;
}
inline int read() {
register int f = 0;
char c;
while (!isdigit(c = getCha... | ### Prompt
Please formulate a Cpp solution to the following problem:
You have a list of numbers from 1 to n written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are 1-indexed). On the i-th step you wipe the i-th number (considering only remaining numbers). You wip... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.