文章分类 -  OI题目

上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要:#include<cstdio> #include<iostream> #include<algorithm> //#include<queue> //#include<vector> //#include<bits/stdc++.h> #define ll long long #define dd 阅读全文
posted @ 2023-08-22 19:10 JMXZ
摘要:#include<iostream> #include<cmath> using namespace std; int a; void fff(int x) { for(int i=14;i>=0;i--) //两万的数据最多是2(14) { if(pow(2,i)<=x) { //pow(n,m) 阅读全文
posted @ 2023-08-22 14:18 JMXZ
摘要:#include<iostream> #include<string> #include<algorithm> using namespace std; string s[21];int n; bool cmp(string a,string b) { // &表示引用 return (a+b >= 阅读全文
posted @ 2023-08-22 12:56 JMXZ
摘要:// LUOGU_RID: 122113992 //#include<bits/stdc++.h> #include<cstdio> #include<iostream> #include<algorithm> #define N 200005 using namespace std; struct 阅读全文
posted @ 2023-08-22 09:15 JMXZ
摘要::::dfs指数级 所以 循环区间 提前判断函数 优化都有极大 效果 与分数 #include <cstdio> using namespace std; int a[55], l[55]; int cost[55][55]; int ans = 2147483645, tmp, n, m; #de 阅读全文
posted @ 2023-08-22 00:26 JMXZ
摘要:#include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<vector> #include<bits/stdc++.h> #define ll long long #define ddd prin 阅读全文
posted @ 2023-08-21 14:06 JMXZ
摘要:// 图论 d[][] 容易exceed // j=i+1~k 否则ans->0 /* 5 7 1 4 1 1 3 300 3 1 10 1 2 16 2 3 100 2 5 15 5 3 20 1 3 5 2 */ #include<cstdio> #include<iostream> #incl 阅读全文
posted @ 2023-08-20 19:14 JMXZ
摘要://if-> else if没有逻辑 /* 5 1 100 60 70 27 88 1 100 75 80 39 34 1 100 50 605 563 50 1 200 160 120 176 40 1 200 10 50 47 84 No Yes Yes Yes No */ #include<c 阅读全文
posted @ 2023-08-20 16:32 JMXZ
摘要:#include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<vector> #include<bits/stdc++.h> #define ll long long #define ddd prin 阅读全文
posted @ 2023-08-20 11:00 JMXZ
摘要://< -> <= #include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<ctime> #include<cmath> #include<bits/stdc++.h> #define ll l 阅读全文
posted @ 2023-08-19 11:13 JMXZ
摘要:#include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<ctime> #include<cmath> #include<bits/stdc++.h> using namespace std; c 阅读全文
posted @ 2023-08-19 10:36 JMXZ
摘要::::pushup时 min/max 注意 :::add/query [l,r) -》 在 r 时刻 已经放下 可以继续上人 //:::pushup 写错了max->min #include<cstdio> #include<cstring> #include<iostream> #include< 阅读全文
posted @ 2023-08-19 01:23 JMXZ
摘要::::开long long :::int ll 间 可以随意换 //a[i]<=int ->s >>>int -> ll #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/s 阅读全文
posted @ 2023-08-19 00:32 JMXZ
摘要:/* #include<iostream> using namespace std; long n,f[20][20];//f数组记录方案 long dfs(int x,int y)//x是操作队列里元素的个数,y是栈里的个数 { if(f[x][y]!=0) return f[x][y];//记忆 阅读全文
posted @ 2023-08-18 14:05 JMXZ
摘要://find->fa[i]=i //因为有环 所以 双向边标记之访问一次 //fa[find()]=find() 没关系 但siz+=.....有问题 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> 阅读全文
posted @ 2023-08-18 10:42 JMXZ
摘要:状态压缩dp :::& 结果<=64 :::有mod 不用 long long %mod 过程量用1ll* :::i>>0~7 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bit 阅读全文
posted @ 2023-08-17 14:05 JMXZ
摘要://ios::sync_sith_stdio(false) -> no cin.tie(0) #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<bits/stdc++.h> #defi 阅读全文
posted @ 2023-08-17 11:45 JMXZ
摘要:::: 主程序要简洁 有些变量 可以放在 子程序 :::双向边-> faa 有环-> vis or TLE :::顺序不可以错 cnt<n 一定 有误 因为是基环树 所以可能 删去了 数枝边 #include<cstdio> #include<cstring> #include<iostream> 阅读全文
posted @ 2023-08-16 14:31 JMXZ
摘要:/* 折半搜索 降低次数 k^n-> k^n/2 * 2 从 始末状态取搜索 相遇就是答案 因为牵一发而动全身 所以-》 ^ 加上位运算 与相连的边 ^(1<<b) 因为 ans<=n 因为重复更改不如不更改 每次搜索都可以选或不选 */ #include<cstdio> #include<iost 阅读全文
posted @ 2023-08-16 08:53 JMXZ
摘要:#include<bits/stdc++.h> using namespace std; int t,n,p[2010]; int main(){ scanf("%d",&t); while(t--){ scanf("%d",&n); int l=0,r=0; for(int i=1;i<=n;i+ 阅读全文
posted @ 2023-08-15 01:15 JMXZ

上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页