新年快乐
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
```cpp #include using namespace std; const int mod=1e8; int n,m,len; int a[150]; int dp[15][2000]; int can[150]; bool flag(int s){ // return s&(s >n>>m; init();…
```cpp #include using namespace std; int n, m, g[110][110], a[110][110], x, y, minn = INT_MAX; int f(int x, int y) { if (a[x][y] == -1) { int maxn = -1; int dx[…
在讨论《30玄关》回复:
@[wang_changyue](luogu://user/996296)你用的好像不是小根堆
```cpp #include using namespace std; int n, a[10010], cnt, ans; void put(int x) { cnt++; a[cnt] = x; int now = cnt, nxt = cnt / 2; while (nxt > 1) { if (a[now]…
```cpp #include using namespace std; const int N = 1e5+10; int n, m, a[N], l[N], r[N]; void f(int t) { a[t] = (a[t] + 1) % 2; if (l[t] == 0) { return ; } else i…
在讨论《0分,样例都过不了》回复:
```cpp #include using namespace std; int n; string f(int n) { if (n == 1) return "2(0)"; if (n == 2) return "2"; int i; for (i = 2; i n) { i--; if (i == 1) retu…
在讨论《0分,样例都过不了》回复:
AC了
```cpp #include using namespace std; int n; string f(int n) { if (n == 1) return "2(0)"; if (n == 2) return "2"; int i; for (i = 2; i n) { i--; return "2(" + f(…
在讨论《50求调》回复:
AC了
在讨论《50求调》回复:
谢谢
在讨论《50求调》回复:
先解决TLE的问题
```cpp #include using namespace std; int n, m, sum; void f(int m) { if (m == 0) { sum++; } else if (m > n; f(n); cout << sum; return 0; } ```
在讨论《没输出,求调》回复:
@[XURUIFAN](luogu://user/1288333) 谢谢
```cpp #include using namespace std; char a[1010][100010]; bool vis[1010][100010]; int n,m; struct Node{ int x,y,step; char g; }t,p; int sx,sy; int dx[]={0,0,-1…
```cpp #include using namespace std; int a[20][20],sum,n; int dx[]={0,0,-1,1}; int dy[]={1,-1,0,0}; struct Node{ int x,y; }t,p; queue q; bool vis[20][20]; int m…
```python #include using namespace std; string s[10],a; int n; void f(int n){ if(n==0){ s[1]+="XXX"; s[2]+="X.X"; s[3]+="X.X"; s[4]+="X.X"; s[5]+="XXX"; } if(n=…
在讨论《90分,1个TLE》回复:
@[xuyixuan_123](luogu://user/1176398)@[AlreadyRead](luogu://user/1098585) 谢谢
```cpp #include using namespace std; const int N = 410; // 棋盘最大尺寸 int dist[N][N]; // 记录从起点到每个点的最短路径 int n, m; // 棋盘大小 int dx[] = {-2, -2, -1, 1, 2, 2, 1, -1}; /…
```cpp #include using namespace std; int n,m,a,b,sum; int main(){ cin>>n>>m>>a>>b; while(1){ if(n>m){ n-=max(a,b); m-=min(a,b); } else{ m-=max(a,b); n-=min(a,b)…
在讨论《40分求调》回复:
@[tu_huang_di](luogu://user/754119) ```cpp #include using namespace std; long long n, m; long long gcd(long long n, long long m) { if (m == 0) { return n; } ret…
在讨论《40分求调》回复:
@[zzwdsj](luogu://user/1346586) ```cpp #include using namespace std; int n, m; int gcd(int n, int m) { if (m == 0) { return n; } return gcd(m, n % m); } int lcm…
```cpp #include using namespace std; long long a,b,n,m; int main(){ cin>>a>>b; for(int i=1;i<=a;i++){ if(a%i==0&&b%i==0){ n=i; } } for(int i=1;i<=a*a;i++){ if(i…
```cpp #include using namespace std; int l,r; bool p(int n){ for(int i=2;i >l>>r; for(int i=l;i<=r;i++){ if(p(i)&&f(i)){ cout<<i<<"\n"; } } return 0; } ```
```cpp #include using namespace std; long long n, m; bool f(long long n) { for (long long i = 1; i > n >> m; for (long long i = 1; i > t; long long q = sqrt(t);…
```cpp #include using namespace std; const int N=130; int a[N][N],s[N][N],n,cnt,m; bool b=true; int main(){ cin>>n>>m; for(int i=1;i >a[i][j]; s[i][j]=s[i-1][j]…
```cpp #include using namespace std; int t, n, m, a[110][110]; bool h(int x, int y) {//这里也可以使用for if (a[x][y] == 1 || a[x][y + 1] == 1 || a[x][y + 2] == 1 || a[…
```cpp #include using namespace std; int n, m, a[20][20], maxn; int h(int b, int c, int d, int e) { int sum = 0; for (int x = b; x > n >> m; for (int i = 1; i >…
```cpp #include using namespace std; int n, t; struct student { int h; int w; bool operator a.w; return h > a.h; } } s[3010]; int main() { ios::sync_with_stdio(…