这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《站外题研究》回复:
感谢@[Doqe](/user/220558)
## 题目描述 出题人是一项开采项目的负责人。整个矿坑可以被看成一个 $N×N$ 的方阵,每个格子所代表的区域内有一些有矿,有的没有。 在进行开采之前,出题人只知道哪些格子有矿,而你需要帮他探明所有有矿的格子中的蕴藏量。 你有一个超能力,可以一次性探清 $H×W$ 的矩形中所有格子内的矿物蕴藏量;不过使用一次需要消耗…
在讨论《B3647 【模板】Floyd 算法》回复:
```cpp #include using namespace std; int f[105][105]; int n,m; int e,t; int main() { cin >> n; memset(f,0x3f,sizeof(f)); cin >> m; for(int i = 1;i > x >> y >> z…
在讨论《发现一个及其奇妙的事情......》回复:
@[uwouni](/user/171636) 好的,明白了,谢谢大佬!
这题我是用floyd做的,但跑一遍Floyd只能得55分(代码如下) ```cpp #include #include using namespace std; int dp[140][140]; int main(){ int p; cin>>p; for(int i=1;i >c1>>c2>>d; dp[c1][c…
在讨论《floyed55分求解》回复:
floyd多跑几遍就行了(我也是一样的问题),我也不知道为什么...... ```cpp #include #include using namespace std; int getnum(char c) { if(c>='a'&&c >n; for(int i=1; i >a>>b>>d; a1=int(a),b1=…
```cpp #include using namespace std; int dp[12][84][1024]; int num[1024]; int getsum(int x){ int tot=0; while(x>0){ tot+=x&1; x >n>>p; for(int i=0;i<(1<<n);i++)…
```cpp #include #include using namespace std; string s[1000005]; int cnt[1000005]; string res; int main(){ int n; cin>>n; int cur=0,total_length=0,dif=0; for(in…
```cpp #include using namespace std; int trie[10000005][2]; int pre[10000005][2],pos; int end1[10000005]; void insert(string s){ int p=0; for(int i=0;i >n>>m; f…
在讨论《萌新求助!! 只有80分 调了一下午也调不对》回复:
乘法那里进了位,关键在于高精度位数不够。把位数改称20000就行了 此贴终结
```cpp #include #include using namespace std; typedef long long ll; struct node{int x,y;}; node a[1005],b[1005]; void msort(int l,int r){ if(l==r) return; int m…
在讨论《求助一道站外题》回复:
把输入的数转成二进制,然后判断哪一位上是1就输出几
在讨论《2021 洛谷省选计划预热》回复:
qp
方法:二分答案枚举区间长度,利用单调队列算出每个区间内的最大值和最小值,然后判断。 复杂度:枚举logn,计算最大最小值并判断n。 以下是代码 ```cpp #include #include using namespace std; int a[3000005]; int maxn[3000005],minn[300…
```cpp #include #include #include using namespace std; struct node{int w,id;}; bool cmp1(node x,node y){ if(x.w!=y.w) return x.w >n>>q; for(int i=1;i >a[i].w; a…
```cpp #include #include #include using namespace std; map ,int> vis_server; unsigned long long hash1(string s){ unsigned long long p=0; for(int i=0;i '9') retu…
在讨论《求助:90分,#12,#18RE了》回复:
建议你用map+哈希
在讨论《暴力报0求助QAQ》回复:
还有一个错误,枚举国际航班时变量应该用m2。 (但最最玄学,最最诡异的是我改了两个错误,结果都一样?!)
在讨论《《 警 示 后 人 》(关于本题的正确骗分思路)》回复:
枚举是40啊(n<=5000,m1+m2<=5000),n方刚好过
在讨论《暴力报0求助QAQ》回复:
你排序的时候是从地址0开始排的,但你存储是从1开始存储的,所以会出大问题。 (但是我还是没搞懂为啥改了这个问题还爆零)
在讨论《真·暴力,求助,为什么WA》回复:
你这个思路是O(n^3)的时间复杂度的,即使能过也会直接tle,你可以考虑用优先队列优化。(参见我朋友的代码) ```cpp #include using namespace std; int n, m1, m2, ans = -1; struct pla1{//国内数据 int x, y; }p1[100003];…
我考场上通过枚举每一种可能的分配情况,然后再通过数组排序模拟廊桥的飞机停靠情况(还没有分配完则继续分配,已分配完则排序,并将cnt归零,开始新一轮分配,具体见代码) ```cpp #include #include #include using namespace std; struct node{int t1,t2;…
在讨论《《 警 示 后 人 》》回复:
我他妈测的时候把freopen注释掉了
```cpp #include #include #include using namespace std; map vis_server; bool check_it(string s){ if(s[0] '9') return false; int cnt_dot=0,cnt_mark=0; bool flag=f…
在讨论《家长直呼太暴力!这些算法可能会被删除》回复:
笑死我了
在讨论《怎样快速拿到省一?》回复:
你只要把所有题目做对,就能拿到省一(doge)
在讨论《怎样快速拿到省一?》回复:
ccf:中国收钱学会(chinese charging federation) 中国骗钱学会(chinese cheating federation)
在讨论《怎样快速拿到省一?》回复:
J组做对前两到题,然后三、四题各骗一点分 S组直接所有题目上暴力(当然强省第一道题还得有正解)
在讨论《问一下构造方式》回复:
第一列顺序填入0,1,2,...,100 第二列顺序填入100,99,98,...,1