自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

老铁,干了这碗algorithms的博客

每天都被自己菜到

  • 博客(6)
  • 收藏
  • 关注

原创 Codeforces Round #481 (Div. 3)

点击打开链接A. 水题 去重但是保持原次序#include<bits/stdc++.h>using namespace std;const int maxn=50+5;int a[maxn],b[maxn];int main(){ int n; scanf("%d",&n); memset(b,0,sizeof(b)); for(int...

2018-05-16 14:46:41 191

原创 Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3)

点击打开链接A.水题 题意开始有些迷#include<bits/stdc++.h>using namespace std;int main(){ int n,s; scanf("%d%d",&n,&s); int last=0,next; bool flag=false; for(int i=0;i<n;i++) ...

2018-05-09 12:49:43 146

原创 Codeforces Round #479 (Div. 3)

点击打开链接A.水题#include<bits/stdc++.h>using namespace std;int main(){ int n,k; scanf("%d%d",&n,&k); while(k--) { if(n%10) n--; else { n/=10; } } cout<<n<<endl; ...

2018-05-08 18:37:05 137

原创 Codeforces Round #476 (Div. 2) [Thanks, Telegram!] (弱鸡持续更新中)

点击打开链接A.数学题 #include<bits/stdc++.h>using namespace std;int main(){ double k,n,s,p; cin>>k>>n>>s>>p; int x=(int)ceil(ceil(n/s)*k/p); cout<<x<&l

2018-05-03 14:45:29 280

原创 链式前向星+dijkstra 使用链式前向星也可避免图中重边的问题

//无向图 链式前向星#include <bits/stdc++.h>using namespace std;const int maxv=100+5;const int maxe=10000+5;struct Edge{int next,to,weight;};Edge edges[maxe];int head[maxv],v,e,cnt;void add(int...

2018-05-03 13:44:46 2168 2

原创 poj 1061 扩展gcd解决模线性方程 求解gcd可以使用库函数__gcd(),头文件为#include<algorithm>

点击打开链接//模线性方程组,方程式为k(m-n)(mod l)=(x-y)(mod l)#include&lt;iostream&gt;#include&lt;cstdio&gt;using namespace std;typedef long long LL;void ex_gcd(LL a,LL b,LL &amp;g,LL &amp;x,LL &amp;y){ if(!...

2018-05-02 13:33:29 3899

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除