ume酱

导航

2018年7月9日 #

洛谷 p2440木材加工

摘要: #include <iostream>#include <cstring>using namespace std;const int N = 1e5 + 100;int a[N],n,k;bool ok(int x){ int num = 0; for(int i=1;i<=n;i++) { num 阅读全文

posted @ 2018-07-09 11:16 ume酱 阅读(129) 评论(0) 推荐(0)

2018年7月7日 #

洛谷 质因子分 p2043

摘要: #include <iostream>#include <algorithm>#include <cstring>using namespace std; const int N = 10000+50;bool isprime[N];int prime[N/2],pn;int ans[N];void 阅读全文

posted @ 2018-07-07 15:54 ume酱 阅读(119) 评论(0) 推荐(0)

Train Problem I

摘要: #include <iostream>#include <string>#include <stack>using namespace std;stack<char> s;bool ans[100000];int main(){ int n; string in,out; while(cin>>n> 阅读全文

posted @ 2018-07-07 14:48 ume酱 阅读(82) 评论(0) 推荐(0)

筛素数

摘要: #include<iostream>#include<algorithm>#include<cstring>using namespace std;const int N=150;bool isprime[N];int prime[N/2],pn;void getprimes(int maxn){ 阅读全文

posted @ 2018-07-07 14:33 ume酱 阅读(132) 评论(0) 推荐(0)