代码拉取完成,页面将自动刷新
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <queue>
#include <cstdio>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#ifndef TEST
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, int> piii;
// fast input
inline ll read() {
ll X = 0, w = 0;
char ch = 0;
while (!isdigit(ch)) {
w |= ch == '-';
ch = getchar();
}
while (isdigit(ch))
X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
return w ? -X : X;
}
// fast output
inline void write(ll x) {
if (x < 0)
putchar('-'), x = -x;
if (x > 9)
write(x / 10);
putchar(x % 10 + '0');
}
#define pb push_back
#define mp make_pair
void solve() {
}
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
/**
这段代码中 fin 是一个 ifstream 类型的对象,用于读取文件 test.in。当打开文件成功,即文件存在且可读时,可以将它作为标准输入流,这可以通过以下语句实现:
cin.rdbuf(fin.rdbuf());
这行代码是将标准输入流 cin 的缓冲区(即键盘输入)由原来的指向控制台(默认情况下)改为指向文件 C.in 的输入流 fin。这样一来,程序在执行输入操作时将从文件 C.in 中读取数据而非键盘输入。
使用这种技巧可以帮助我们更加方便地进行本地测试,将输入数据替换为文件,而不是每次手动输入数据
*/
ifstream fin("test.in");
if (fin.good()) {
cin.rdbuf(fin.rdbuf());
}
int t = 1;
while (t--) {
solve();
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。