- 博客(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<iostream>#include<cstdio>using namespace std;typedef long long LL;void ex_gcd(LL a,LL b,LL &g,LL &x,LL &y){ if(!...
2018-05-02 13:33:29 3899
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人