跳到正文

mine_mine

778977

断弦的吉他 始终弹不出我要的答案

资料、奖项与版本

资料

编号
778977
抓取

https://nflsoi.cc:10999/draw/

https://cpret.online/

https://snapany.com/zh/bilibili

https://www.luogu.com.cn/article/effqd5i7

330302201011092817

330327201010240870

http://121.40.77.190/

https://crystalcoreqwq.github.io/post/%E6%B4%9B%E8%B0%B7%E7%B2%BE%E5%93%81%E5%A5%B3%E8%A3%85%E5%90%88%E9%9B%86/

U637378 团105848 1591683 tofubeats Remix

C++
#include<bits/stdc++.h>
//#pragma GCC optimize(1,2,3,"Ofast","inline")
#define int long long
#define into into
using namespace std;
inline int read(){
	int res=0,f=1;
	char ch=getchar();
	while(ch<48||ch>57){
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(ch>47&&ch<58){
		res=(res<<3)+(res<<1)+(ch^48);
		ch=getchar();
	}
	return res*f;
}
inline int Min(int a,int b){
	return a<b?a:b;
}
inline int Max(int a,int b){
	return a>b?a:b;
}
signed main(){
	return 0;
}

P10257 P11485 P12210 P13134 P13429 P14535
https://www.luogu.me/problem?difficulty=2&accept_solution=true&prefix=P&page=1
https://www.luogu.com.cn/discuss/1217459
https://www.luogu.com.cn/discuss/1201662
https://www.luogu.com.cn/user/1858221
https://cornhub.website/
1号机房 10.101.31.149
2号机房 10.20.12.161
5号机房 10.8.8.21

C++
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <time.h>
#include <bit>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <functional>
#include <limits>
#include <numeric>
#include <vector>
#ifndef __OY_LINUXIO__
#define __OY_LINUXIO__
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <string>
#include <vector>
#ifdef __unix__
#include <sys/mman.h>
#include <sys/stat.h>
#endif
#if __cpp_constexpr >= 201907L
#define CONSTEXPR20 constexpr
#define INLINE20 constexpr
#else
#define CONSTEXPR20
#define INLINE20 inline
#endif
#define cin OY::LinuxIO::InputHelper<>::get_instance()
#define cout OY::LinuxIO::OutputHelper::get_instance()
#ifndef INPUT_FILE
#define INPUT_FILE "in.txt"
#endif
#ifndef OUTPUT_FILE
#define OUTPUT_FILE "out.txt"
#endif
namespace OY {
	namespace LinuxIO {
		static constexpr size_t INPUT_BUFFER_SIZE = 2255569, OUTPUT_BUFFER_SIZE = 232992;
#ifdef OY_LOCAL
		static constexpr char input_file[] = INPUT_FILE, output_file[] = OUTPUT_FILE;
#else
		static constexpr char input_file[] = "", output_file[] = "";
#endif
		template <typename U, size_t E>
		struct TenPow {
			static constexpr U value = TenPow<U, E - 1>::value * 10;
		};
		template <typename U>
		struct TenPow<U, 0> {
			static constexpr U value = 1;
		};
		struct InputPre {
			uint32_t m_data[0x10000];
			CONSTEXPR20 InputPre()
			{
				std::fill(m_data, m_data + 0x10000, -1);
				for (size_t i = 0, val = 0; i != 10; i++)
					for (size_t j = 0; j != 10; j++)
						m_data[0x3030 + i + (j << 8)] = val++;
			}
		};
		struct OutputPre {
			uint32_t m_data[10000];
			CONSTEXPR20 OutputPre() {
				uint32_t *c = m_data;
				for (size_t i = 0; i != 10; i++)
					for (size_t j = 0; j != 10; j++)
						for (size_t k = 0; k != 10; k++)
							for (size_t l = 0; l != 10; l++)
								*c++ = i + (j << 8) + (k << 16) + (l << 24) + 0x30303030;
			}
		};
		template <size_t MMAP_SIZE = 1 << 27>
		struct InputHelper {
			static INLINE20 InputPre pre{};
			char *m_p, *m_c, *m_end;
			InputHelper(FILE *file = stdin) {
#ifdef __unix__
				struct stat _stat;
				auto fd = fileno(file);
				fstat(fd, &_stat);
				m_c = m_p = (char *)mmap(nullptr, _stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
				m_end = m_p + _stat.st_size;
#else
				uint32_t size = fread(m_c = m_p = new char[INPUT_BUFFER_SIZE], 1, INPUT_BUFFER_SIZE, file);
				m_end = m_p + size;
#endif
			}
			static InputHelper<MMAP_SIZE> &get_instance() {
				static InputHelper<MMAP_SIZE> s_obj(*input_file ? fopen(input_file, "rt") : stdin);
				return s_obj;
			}
			template <typename Tp, typename std::enable_if<std::is_unsigned<Tp>::value & std::is_integral<Tp>::value>::type * = nullptr>
			InputHelper &operator>>(Tp &x) {
				x = 0;
				while (!isdigit(*m_c))
					m_c++;
				x = *m_c++ ^ '0';
				while (~pre.m_data[*reinterpret_cast<uint16_t *&>(m_c)])
					x = x * 100 + pre.m_data[*reinterpret_cast<uint16_t *&>(m_c)++];
				if (isdigit(*m_c))
					x = x * 10 + (*m_c++ ^ '0');
				return *this;
			}
			template <typename Tp, typename std::enable_if<std::is_signed<Tp>::value & std::is_integral<Tp>::value>::type * = nullptr>
			InputHelper &operator>>(Tp &x) {
				typename std::make_unsigned<Tp>::type t{};
				bool sign{};
				while (!isdigit(*m_c))
					sign = (*m_c++ == '-');
				t = *m_c++ ^ '0';
				while (~pre.m_data[*reinterpret_cast<uint16_t *&>(m_c)])
					t = t * 100 + pre.m_data[*reinterpret_cast<uint16_t *&>(m_c)++];
				if (isdigit(*m_c))
					t = t * 10 + (*m_c++ ^ '0');
				x = sign ? -t : t;
				return *this;
			}
			InputHelper &operator>>(char &x) {
				while (*m_c <= ' ')
					m_c++;
				x = *m_c++;
				return *this;
			}
			InputHelper &operator>>(std::string &x) {
				while (*m_c <= ' ')
					m_c++;
				char *c = m_c;
				while (*c > ' ')
					c++;
				x.assign(m_c, c - m_c), m_c = c;
				return *this;
			}
			InputHelper &operator>>(std::string_view &x) {
				while (*m_c <= ' ')
					m_c++;
				char *c = m_c;
				while (*c > ' ')
					c++;
				x = std::string_view(m_c, c - m_c), m_c = c;
				return *this;
			}
		};
		struct OutputHelper {
			static INLINE20 OutputPre pre{};
			FILE *m_file;
			char m_p[OUTPUT_BUFFER_SIZE], *m_c, *m_end;
			OutputHelper(FILE *file = stdout) {
				m_file = file;
				m_c = m_p, m_end = m_p + OUTPUT_BUFFER_SIZE;
			}
			~OutputHelper() { flush(); }
			static OutputHelper &get_instance() {
				static OutputHelper s_obj(*output_file ? fopen(output_file, "wt") : stdout);
				return s_obj;
			}
			void flush() { fwrite(m_p, 1, m_c - m_p, m_file), m_c = m_p; }
			OutputHelper &operator<<(char x) {
				if (m_end - m_c < 20)
					flush();
				*m_c++ = x;
				return *this;
			}
			OutputHelper &operator<<(uint32_t x) {
				if (m_end - m_c < 20)
					flush();
#define CASEW(w)                                                           \
				case TenPow<uint32_t, w - 1>::value... TenPow<uint32_t, w>::value - 1: \
				*(uint32_t *)m_c = pre.m_data[x / TenPow<uint32_t, w - 4>::value]; \
				m_c += 4, x %= TenPow<uint32_t, w - 4>::value;
				switch (x) {
				default:
					*(uint32_t *)m_c = pre.m_data[x / TenPow<uint32_t, 6>::value];
					m_c += 4;
					x %= TenPow<uint32_t, 6>::value;
					CASEW(6);
				case 10 ... 99:
					*(uint32_t *)m_c = pre.m_data[x * 100];
					m_c += 2;
					break;
					CASEW(9);
					CASEW(5);
				case 0 ... 9:
					*m_c++ = '0' + x;
					break;
					CASEW(8);
				case 1000 ... 9999:
					*(uint32_t *)m_c = pre.m_data[x];
					m_c += 4;
					break;
					CASEW(7);
				case 100 ... 999:
					*(uint32_t *)m_c = pre.m_data[x * 10];
					m_c += 3;
					break;
				}
#undef CASEW
				return *this;
			}
			OutputHelper &operator<<(int32_t x) {
				if (x >= 0)
					return (*this) << uint32_t(x);
				else
					return (*this) << '-' << uint32_t(-x);
			}
		};
	}
}
#endif
共 3 篇
  1. 题解

    题解:P15091 [UOI 2025 II Stage] Catamarans

    P15091 [UOI 2025 II Stage] Catamarans 题解 题目传送门 思路 不难知道,对于每个体重在 60,80,100,的人,均不可能有两个此体重的人在一艘船上,那么我们只需要将他们个数的总和计入答案,再将体重为 20,40 的人尽量加入到这些船中,然后…

  2. 题解

    题解:P11485 「Cfz Round 5」Non-breath Oblige

    P11485 「Cfz Round 5」Non-breath Oblige 题解 题目传送门 题意 题目描述清晰,不多讲述。 结论 forall s=t,都有 ans=0。 forall s,t ∈ [0,2^n) 且 s ≠ t,都有 ans=(soplus(2^n-1))+(…