bits/stdc++.h
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
```cpp #include using namespace std; int n=9,maxx=-1; int a[10][10]; int score1[10][10]={ {},{0,6,6,6,6,6,6,6,6,6}, {0,6,7,7,7,7,7,7,7,6}, {0,6,7,8,8,8,8,8,7,6}…
在讨论《记忆化搜索40分求助》回复:
现在优化了一下,在mem_dfs(m1-10,s1-60,t1-1);后面加了return;(我后来想到能闪为何不闪呢?所以用贪心) 80分,一点MLE,一点TLE
在讨论《记忆化搜索40分求助》回复:
记忆化搜索不等同于动态规划(DP)吗
```cpp #include using namespace std; int m,s,t,t2=2147483647,dis; bool yes=false; map > > flag; void mem_dfs(int m1,int s1,int t1){ if(t1==0){ dis=max(dis,s-s1)…
在讨论《MLE10分求调》回复:
https://www.luogu.com.cn/record/144807214
```cpp #include using namespace std; //a+b==c+d||a-b==c-d||a==c||b==d int k,n,m,cnt; string a[40001]; int x[501],y[501]; //字符串数组为棋盘 int main() { scanf("%d%d%d",…
```cpp #include using namespace std; char c; string s; int a,b; signed main() { while(1) { cin>>c; if(c=='E'||c=='\n') break; else s+=c; } for(int i=0;i<s.lengt…
```cpp #include using namespace std; int goal=1; int n,m; int T; int book[500005]; signed main2() { goal=1; bool flag=1; cin>>n>>m; for(int i=1;i >opt>>x; if(fl…
```cpp #include using namespace std; int a[100005],n,ans,maxn; string str[10005],M; int num(string alg) { int cnt=0; string alg1=""; char Last; if(alg[0]=='0')…
```cpp #include using namespace std; int n; string a; int mpow(int p) { if(p==0) return(1); if(p==1) return(2); if(p%2) return(mpow(p-1)*2); int temp=mpow(p/2);…
看了题解思路自己打的代码 ```cpp #include using namespace std; #define int long long int n; signed main() { int T; cin>>T; while(T--) { scanf("%d",&n); while(n%2==0) { n/=2;…
在讨论《记忆化搜索只有十分,为什么?》回复:
```cpp #include using namespace std; #define int long long int n,dp[1001]; int prime[251],cnt; bool flag[1001]; int rememberdfs(int n) { if(n==0)return 1; if(n=…
``` #include using namespace std; #define int long long int n,dp[1001]; int prime[251],cnt; bool flag[1001]; int rememberdfs(int n) { if(n==0)return 0; if(n==1)…
```cpp #include using namespace std; #define int unsigned long long char c; vector num; vector s; int t; char d[17]="0123456789ABCDEF"; string tohex(int m) { st…
在讨论《警示后人,如果你72分》回复:
谢谢
在讨论《这根本挑不出错误,为什么是50分(TLE)》回复:
终于做对了,此帖终
在讨论《这根本挑不出错误,为什么是50分(TLE)》回复:
@[Bingxiu](/user/676498)
在讨论《这根本挑不出错误,为什么是50分(TLE)》回复:
```cpp #include using namespace std; int n; string ans="1"; int s[510]={}; string mul(string a) { string res=""; memset(s,0,sizeof(s)); int k=a.size(); int m=k;…
在讨论《这根本挑不出错误,为什么是50分(TLE)》回复:
@[lujunxuan123](/user/716372) 写快速幂还要高精乘高精的代码,这太复杂了,还不知道这每次要算250000次的乘法能不能过
在讨论《这根本挑不出错误,为什么是50分(TLE)》回复:
@[Bingxiu](/user/676498) 高精度么,写不写快速幂有啥区别?
```cpp #include using namespace std; int n; string ans="1"; int s[510]={}; string mul(string a) { string res=""; memset(s,0,sizeof(s)); int k=a.size(); int m=k;…
```cpp #include using namespace std; int n,m,cnt=0,sum=0,tot=1; struct edge { int from,to,val; bool operator >n>>m; for(int i=1;i<=m;i++) { for(int j=1;j<=m;j++…
在讨论《求助!6点黑了!!!!!!!》回复:
@[A_SunnY_BoY](/user/786957) 为什么?
我这40分样例过了怎么回事啊 ```cpp #include using namespace std; vector ve[5100]; int n,m,p; vector operator +(vector a,vector b) { int l1=a.size(),l2=b.size(); vector c={};…
```cpp #include using namespace std; struct edge{ int to; double w; }; double distan(int x1,int y1,int x2,int y2) { double a1=abs(x1-x2); double a2=abs(y1-y2);…
```cpp #include using namespace std; struct edge{ int to,w; }; int t,s,m,n; vector ve[10100]; int dis[10100]; bool book[10100]; signed main() { cin>>n>>m>>s>>t;…
```cpp #include using namespace std; #define inf 0x3f3f3f3f int p,f,c,d[600][600],fi[600]; struct node { int num,pos; }s[600]; bool cmp(node x,node y) { if(x.nu…
```cpp #include using namespace std; bool isntp[20010];//不是质数为1 int pr[20010],cur=0,n; void work1() { isntp[0]=1; for(int i=2;i<=n;i++) { if(!isntp[i]) pr[++cur…
在讨论《真搞不懂为什么是90分,#2TLE》回复:
@[Zhuyiming0325](/user/804115) 10^8就是计算机的速度,1s正好过
```cpp #include using namespace std; int n,m,h[110][110]; int ans=-1; void dfs(int x,int y,int cnt,int lst) { if(x>n||x m||y =lst) return; ans=max(ans,cnt); lst…