社区讨论

建议添加数据&撤下所有题解

P8024[ONTAK2015] Stumilowy sad参与者 7已保存回复 13

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
13 条
当前快照
1 份
快照标识符
@lo8wt2iv
此快照首次捕获于
2023/10/28 01:50
2 年前
此快照最后确认于
2023/10/28 01:50
2 年前
查看原帖
Rt,这题应该是类似线段树 3 的做法,但是所有题解都是假做法。
这题难度应该不低于线段树3。
CPP
/*
    Author : SharpnessV & SharpnessX & 7KByte
    Right Output ! & Accepted !
*/
#include<bits/stdc++.h>
//#include<atcoder/all>
//#define int long long

#define rep(i, a, b) for(int i = (a);i <= (b);i++)
#define pre(i, a, b) for(int i = (a);i >= (b);i--)
#define rp(i, a) for(int i = 1; i <= (a); i++)
#define pr(i, a) for(int i = (a); i >= 1; i--)
#define go(i, x) for(auto i : x)

#define mp make_pair
#define pb emplace_back
#define pf push_front
#define fi first
#define se second
#define si(x) (int)(x).size()
#define pc putchar
#define gc getchar
#define el putchar('\n')

using namespace std;
const double eps = 1e-15, pi = 3.1415926535897932385;
typedef long long LL;
typedef pair<int,int> Pr;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}, inf = 0x7fffffff, inf_ = 0x80000000;
const LL Inf = 0x7fffffffffffffffLL, Inf_ = 0x8000000000000000LL;
//char buf[1<<22],*p1=buf,*p2=buf;
//#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
template <typename T> inline void read(T &x) {
    x = 0;bool flag = false; char ch = getchar();
    while (ch < '0' || ch > '9')flag = ch == '-' ? true : false, ch = getchar();
    while (ch >= '0' && ch <= '9')x = (x << 3) + (x << 1) + (ch & 15), ch = getchar();
    if(flag) x = -x;
}
template <typename T,typename... Args> inline void read(T &t,Args&... args){read(t);read(args...);}
int gcd(int x,int y) {  return y ? gcd(y, x % y) : x;}
int lcm(int x,int y) {  return x / gcd(x, y) * y;}
#define P 1000000007
//#define P 998244353
#define bas 229
template<typename T> void cmx(T &x, T y){if(y > x) x = y;}
template<typename T> void cmn(T &x, T y){if(y < x) x = y;}
template<typename T> void ad(T &x, T y) {x += y; if(x >= P) x -= P;}
template<typename T> void su(T &x, T y) {x -= y; if(x < 0) x += P;}
int Pow(int x, int y){
    int now = 1 ;
    for(; y; y >>= 1, x = 1LL * x * x % P)if(y & 1) now = 1LL * now * x % P;
    return now;
}

/***************************************************************************************************************************/
/*                                                                                                                         */
/***************************************************************************************************************************/
#define N 500000

int main() {
    freopen("INPUT","w",stdout);
    printf("%d %d\n", N, N);
    rp(i, N)if(i & 1)printf("1 "); else printf("1000000000 ");
    el;
    rp(i, N)printf("3 1 %d %d\n", N, i);
    return 0;
}

回复

13 条回复,欢迎继续交流。

正在加载回复...