#include<iostream> #include<string> using namespace std; #define shift(x, n) (((x) << (n)) | ((x) >> (32-(n))))//右移的时候,高位一定要补零,而不是补充符号位 #define F(x, y ...
分类:
编程语言 时间:
2021-05-23 23:50:56
阅读次数:
0
#include<iostream> #include<cstring> #include<string> #include<stdio.h> using namespace std; void print(int n,char *x,char *y) { if(n<=0) return; int ...
分类:
其他好文 时间:
2021-05-23 23:32:39
阅读次数:
0
正题 题目链接:https://www.luogu.com.cn/problem/CF1511G 题目大意 给出$n*m$的棋盘上每一行有一个棋子,双方轮流操作可以把一个棋子向左移动若干步(不能不动),无法操作者输。 $q$次询问只留下期盼的$l\sim r$列时的胜负情况。 解题思路 右边界就是一 ...
分类:
其他好文 时间:
2021-05-23 23:29:36
阅读次数:
0
#数方格 输入格式: 第一行两个整数n和m,表示用于建造广场区域的长和宽。 输出格式: 一个整数,建造广场的可行方案数。 /#include using namespace std; int cnt = 0; int main() { int n, m; cin >> n >> m; for (in ...
分类:
其他好文 时间:
2021-05-23 23:27:37
阅读次数:
0
题目 Atcoder 思路 代码 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 4000010, mod = 1e9 + 7; int n, k, fact ...
分类:
其他好文 时间:
2021-05-23 23:13:50
阅读次数:
0
原题链接 考察:floyd 思路: 很明显的传递闭包,但是我们直接敲板子上去会TLE.神级剪枝在floyd的第三重循环,如果g[i][k] = 0那么第三重循环没必要进行. 1 #include <iostream> 2 #include <cstring> 3 using namespace st ...
分类:
其他好文 时间:
2021-05-23 23:11:48
阅读次数:
0
C语言 使用long类型: #include "math.h" int reverse(int x){ int max = pow(2,31)-1; int min = pow(2,31)*-1; long n=0; while (x!=0){ n = n*10 + x%10; x = x/10; ...
分类:
编程语言 时间:
2021-05-23 23:09:40
阅读次数:
0
很明显的拓扑 推一波: https://www.luogu.com.cn/blog/Hehe-0/p2017-dizzy-cows-g 1 #include<bits/stdc++.h> 2 3 4 using namespace std; 5 const int mmm=1e6+1; 6 7 in ...
分类:
其他好文 时间:
2021-05-23 23:01:52
阅读次数:
0
//单链表基本操作 1 #include <stdio.h> 2 3 #include <stdlib.h> 4 5 6 typedef struct _NODE 7 { 8 int data; 9 struct _NODE *pNext; 10 }NODE,*PNODE; 11 12 PNODE ...
分类:
编程语言 时间:
2021-05-23 22:56:58
阅读次数:
0
Luogu-CF1291B 题目分析 对于一个序列 \(a\),我们需要找一个分界线,使左半边严格单调递增,而右半边严格单调递减。 我们可以构建出最小的满足题意的序列 \(b\),如下面这样: \[ 0,1,2,...,M-1,M,M-1,...,2,1,0 \] 那么,我们可以将 \(a_i\) ...
分类:
其他好文 时间:
2021-05-20 17:51:29
阅读次数:
0