problemcutter

导航

2015年3月6日 #

SPOJ Problem 9948:Will it ever stop

摘要: 如题。。http://www.spoj.com/problems/WILLITST/#includelong long n;int main(){ scanf("%lld",&n); while(n>1){ if (n==3||n==6){printf("NIE\n");r... 阅读全文

posted @ 2015-03-06 21:16 problemcutter 阅读(116) 评论(0) 推荐(0)

SPOJ Problem 3375:Stamps

摘要: 题目大意:你需要一拖邮票,你有一坨的朋友可以给你邮票,问最少要多少个朋友才能弄到邮票。#include#include#include#includeusing namespace std;bool comp(int x,int y){return x>y;}int n,m,i,j,t,s;int ... 阅读全文

posted @ 2015-03-06 20:53 problemcutter 阅读(120) 评论(0) 推荐(0)

SPOJ Problem 1724:Counting Triangles

摘要: 题目大意:数三角形。。数据范围是一百万,而且暴力不可行,所以要推公式。公式可以参照http://www.docin.com/p-720073077.html#includeint t; long long n,m,ans;int main(){ scanf("%d",&t); while... 阅读全文

posted @ 2015-03-06 20:18 problemcutter 阅读(143) 评论(0) 推荐(0)

SPOJ Problem 379:Ambiguous Permutations

摘要: http://www.spoj.com/problems/PERMUT2/如题。。#include#includeint n,i,j;int a[100005];int main(){ while(scanf("%d",&n)&&n){ for (i=1;i<=n;i++){ ... 阅读全文

posted @ 2015-03-06 18:57 problemcutter 阅读(101) 评论(0) 推荐(0)