跳到正文

zty02281128

490993

资料、奖项与版本

资料

编号
490993
抓取

奖项

2025 CSP-S
一等奖
2025 NOIP
一等奖
2024 CSP-S
一等奖
2024 NOIP
二等奖

3364133437

C++
#include<bits/stdc++.h>
using namespace std;
static char buf[1000000],*p1=buf,*p2=buf,obuf[1000000],*p3=obuf;
#define gc() p1==p2&&(p2=(p1=buf)+fread(buf,1,1000000,stdin),p1==p2)?EOF:*p1++
#define pc(x) (p3-obuf<1000000)?(*p3++=x):(fwrite(obuf,p3-obuf,1,stdout),p3=obuf,*p3++=x)
inline int read(){
    int x=0;int f=1;char c=gc();
    for(;c<'0'||c>'9';c=gc())if(c=='-')f=-1;
    for(;c>='0'&&c<='9';c=gc())x=(x<<1)+(x<<3)+c-'0';
    return x*f;
}
static char cc[20];
inline void print(int x){ 
    if(!x)pc('0');
    int len=0;
    if(x<0)x=-x,pc('-');
    while(x)cc[len++]=x%10|'0',x/=10;
    while(len--)pc(cc[len]);
}
inline void write(int x,char c){print(x),pc(c);}
int main(){
    
    fwrite(obuf,p3-obuf,1,stdout);
    return 0;
}

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());

auto * nu = new unsigned;
mt19937 rnd(time(0) ^ ( * nu));
共 2 篇
  1. 题解

    题解:P3788 幽幽子吃西瓜

    作者指出前一篇题解存在三角函数(cos 应为 sin)及变量位置错误,故基于原思路重写了 C++ 代码。新代码通过详细的多分支逻辑处理不同角度区间的计算,最终输出百分比结果。