![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces
tenglinxi
这个作者很懒,什么都没留下…
展开
-
Codeforces 577A Multiplication Table
题目:点击打开链接代码:#include#include#include#includeusing namespace std;int main(){ __int64 n,x; while(~scanf("%I64d%I64d",&n,&x)) { __int64 ans=0; for(__int64 i=1; i<=原创 2016-02-05 22:24:11 · 348 阅读 · 0 评论 -
Codeforces 651A Joysticks(模拟)
题目:http://codeforces.com/problemset/problem/651/A代码:#include#includeusing namespace std;int main(){ int a,b; while(~scanf("%d%d",&a,&b)) { int ans=0; if(a==1&&b==原创 2016-03-07 22:20:57 · 344 阅读 · 0 评论 -
Codeforces 659A Round House (模拟)
题目:http://codeforces.com/contest/659/problem/A自己打的时候完全不对,各种细节。找的样例一个一个过,妈的。哎,智商-100,。代码:#include#includeusing namespace std;int main(){ int n,a,b; scanf("%d%d%d",&n,&a,&b);原创 2016-03-31 11:23:05 · 415 阅读 · 0 评论 -
Codeforces 651B Beautiful Paintings(不可思议的暴力)
题目:http://codeforces.com/problemset/problem/651/B代码:#include#include#includeusing namespace std;int t;int cmp(int b[1005]){ for(int i=0; i<t; i++) { if(b[i]!=0)原创 2016-03-07 23:37:01 · 393 阅读 · 0 评论 -
CodeForces 625B War of the Corporations
题目:http://codeforces.com/problemset/problem/625/B代码:#include#includeusing namespace std;int main(){ char a[100005]; char b[135]; while(~scanf("%s%s",a,b)) { int x=0;原创 2016-03-08 16:39:22 · 323 阅读 · 0 评论 -
Codeforces 653A Bear and Three Balls
题目:http://codeforces.com/problemset/problem/653/A代码:#include#include#includeusing namespace std;int book[10005]={0};int main(){ for(int i=0;i<=10005;i++) book[i]=0; int n;原创 2016-03-22 22:46:02 · 252 阅读 · 0 评论 -
Codeforces 652A Gabriel and Caterpillar (此题有毒)
题目:http://codeforces.com/contest/652/problem/A代码:#include#includeusing namespace std;int main(){ int h1,h2; int a,b; scanf("%d%d",&h1,&h2); scanf("%d%d",&a,&b); int temp;原创 2016-03-26 01:09:19 · 505 阅读 · 0 评论 -
Codeforces 658A Bear and Reverse Radewoosh
题目:http://codeforces.com/problemset/problem/658/A代码:#include#include#includeusing namespace std;int main(){ int n,c; scanf("%d%d",&n,&c); int a[55]= {0},b[55]= {0}; int ans1原创 2016-03-29 11:54:11 · 259 阅读 · 0 评论 -
codeforces 676C Vasya and String (尺取法)
题目:http://codeforces.com/problemset/problem/676/C代码:#includeusing namespace std;const int maxn=1e5+5;char a[maxn];int n,k;int main(){ scanf("%d%d",&n,&k); //getchar(); scanf("%s",a原创 2016-05-26 21:52:21 · 227 阅读 · 0 评论 -
CodeForces 165A Supercentral Point(水题)
题目:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=114355#problem/A代码:#include#includeusing namespace std;struct node{ int x; int y;} q[205];int main(){ int t; scan原创 2016-05-07 17:19:05 · 324 阅读 · 0 评论 -
CodeForces 165B Burning Midnight Oil(二分)
题目:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=114355#problem/B代码:#include#includeusing namespace std;__int64 n,k;int judge(__int64 x){ __int64 ans=1; __int64 kk=k; _原创 2016-05-07 19:59:13 · 405 阅读 · 0 评论 -
Codefoces 677C Vanya and Label (预处理/翻译)
C. Vanya and Labeltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhile walking down the street Vanya saw a原创 2016-06-02 16:17:39 · 709 阅读 · 0 评论 -
Codeforces 677B Vanya and Food Processor (模拟的好题)
B. Vanya and Food Processortime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya smashes potato in a vertic原创 2016-06-02 16:25:25 · 789 阅读 · 0 评论 -
Codeforces 682C C. Alyona and the Tree (DFS)
C. Alyona and the Treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlyona decided to go on a diet and we原创 2016-06-22 15:11:00 · 567 阅读 · 0 评论 -
Codeforces 706C Hard problem (DP)
#include#include#include#include#include#includeusing namespace std;long long a[100005];string str1[100005],str2[100005];long long dp[100005][2];int main(){ int t; scanf("%d",&t);原创 2016-08-30 18:52:10 · 272 阅读 · 0 评论 -
Codeforces 449B Jzzhu and Cities (最短路/SPFA/priority_queue<int>Q)
#include#include#include#includeusing namespace std;const int maxn=1e6+5;int n,m,k,num;struct node{ int x,y; int next,v;}G[maxn];int head[maxn];int dis[maxn];int in[maxn];int x[ma原创 2016-09-02 15:55:16 · 714 阅读 · 0 评论 -
Codeforces 540C Ice Cave (BFS)
题目:http://codeforces.com/problemset/problem/540/C代码:#include#include#includeusing namespace std;struct node{ int x,y;} base,ans;int n,m;int dx[4]= {1,0,-1,0};int dy[4]= {0,1,0,-1};c原创 2016-03-30 20:28:29 · 281 阅读 · 0 评论 -
Codeforces 629A Far Relative’s Birthday Cake
题目:http://codeforces.com/contest/629代码:#include#includeusing namespace std;char maps[105][105];long long C(int a,int b){ long long ans=1; for(int i=0;i<b;++i) { ans*=a-原创 2016-02-21 08:21:21 · 297 阅读 · 0 评论 -
Codeforces 630F Selection of Personnel ( C(a,b) )
题目:http://codeforces.com/problemset/problem/630/F代码:#includeusing namespace std;long long C(int a,int b) //新姿势GET{ long long ans=1; for(int i=0;i<b;++i) {原创 2016-02-20 15:22:28 · 336 阅读 · 0 评论 -
Codeforces 622A Infinite Sequence
题目:http://codeforces.com/problemset/problem/622/A代码:#includeint main(){ long long n,i; scanf("%I64d",&n); i=0; while(n>i) n=n-i,i++; printf("%I64d",n);}原创 2016-02-11 14:48:37 · 245 阅读 · 0 评论 -
Codeforces 626A Robot Sequence
题目:http://codeforces.com/problemset/problem/626/A代码:#include#include#includeusing namespace std;int main(){ int a; while(~scanf("%d",&a)) { char b[205]; scanf("%原创 2016-02-14 10:33:31 · 346 阅读 · 0 评论 -
Codeforces 621A Wet Shark and Odd and Even
题目:点击打开链接题意:求几个最大的数的和且保证和为偶数。代码:#includeusing namespace std;long long x,s,k=1e18;int main(){ int n; cin>>n; for (int i=0;i<n;i++) { cin>>x; if(x&1) k=min(k,x); s+=x; } if(s&1原创 2016-02-02 01:51:48 · 256 阅读 · 0 评论 -
Codeforces 621B Wet Shark and Flowers
题目:点击打开链接题意:在一个1000*1000的棋盘中如果有两个棋子在对角线上答案加一,且(1 ≤ xi, yi ≤ 1000)。例子:输入:51 11 53 35 15 5输出66=(11,33)+(11,55)+(33,55)+(15,33)+(15,51)+(33,51)。分析:x1-y1==x2-y2 或者 x1+y1==x2+y2原创 2016-02-02 22:33:05 · 447 阅读 · 0 评论 -
Codeforces 624A Save Luke
题目:点击打开链接代码:#include#includeusing namespace std;int main(){ double d,l,v1,v2; //while(1){ scanf("%lf%lf%lf%lf",&d,&l,&v1,&v2); printf("%.6lf",(l-d)/(v1+v2));}原创 2016-02-05 03:49:51 · 294 阅读 · 0 评论 -
Codeforces 25A IQ test
题目:http://codeforces.com/problemset/problem/25/A代码:#include#include //还真是IQ测试using namespace std;int main(){ int t; scanf("%d",&t); int a[105]; int n,m,j=0,k=0; f原创 2016-02-18 14:24:27 · 322 阅读 · 0 评论 -
Codeforces 25B Phone numbers(此题有毒可以忽略)
题目:http://codeforces.com/problemset/problem/25/B代码:#include#include#includeusing namespace std;int main(){ int n; string a; cin>>n; cin>>a; if(n%3==0) { cout<<a[0]<<a[1]<<a[2];原创 2016-02-18 14:30:03 · 369 阅读 · 0 评论 -
Codeforces 25C Roads in Berland(floyed)
题目:http://codeforces.com/problemset/problem/25/C代码:#include#include#includeusing namespace std;long long maps[305][305];int n,m;int main(){ scanf("%d",&n); for(int i=1;i<=n;i++)原创 2016-02-18 14:34:16 · 422 阅读 · 0 评论 -
Codeforces 628A Tennis Tournament
题目:http://codeforces.com/contest/628/problem/A代码:#includeint a,b,c;int main(){ while(~scanf("%d%d%d",&a,&b,&c)) { printf("%d %d\n",(a-1)*(2*b+1),a*c); }}只要翻译。原创 2016-02-20 12:37:09 · 323 阅读 · 0 评论 -
Codeforces 628B New Skateboard (数学)
题目:http://codeforces.com/contest/628/problem/B代码:#include#include#include#includeusing namespace std;int main(){ string a; cin>>a; __int64 ans=0; for(int i=0;i<a.length();i原创 2016-02-20 12:39:46 · 254 阅读 · 0 评论 -
Codeforces 630R Game
题目:http://codeforces.com/contest/630/problem/R代码:#include#include#includeusing namespace std;int main(){ char a[100]; scanf("%s",a); int t=strlen(a)-1; // printf("%c",a[t]);原创 2016-02-20 14:29:37 · 325 阅读 · 0 评论 -
Codeforces 630A Again Twenty Five!
题目:http://codeforces.com/contest/630/problem/A代码:#include#includeusing namespace std;int main(){ int t; scanf("%d",&t); printf("25");}原创 2016-02-20 14:32:34 · 314 阅读 · 0 评论 -
Codeforces 630B Moore's Law
题目:http://codeforces.com/contest/630/problem/B代码:#include#include#includeusing namespace std;int main(){ __int64 a,b; scanf("%I64d%I64d",&a,&b); printf("%llf",a*pow(1.000000011,b原创 2016-02-20 14:34:11 · 373 阅读 · 0 评论 -
Codeforces 630C Lucky Numbers
题目:http://codeforces.com/contest/630/problem/C代码:#include#include#includeusing namespace std;int main(){ int t; scanf("%d",&t); __int64 sum=1; for(int i=1;i<=t+1;i++) {原创 2016-02-20 14:35:40 · 338 阅读 · 0 评论 -
COdeforces 630D Hexagons!
题目:http://codeforces.com/contest/630/problem/D代码:#include#include#includeusing namespace std;int main(){ __int64 t; scanf("%I64d",&t); __int64 sum=1; __int64 n=1; // for(i原创 2016-02-20 14:37:47 · 86 阅读 · 0 评论 -
Codeforces 706D Vasiliy's Multiset (字典树求异或最大值)
模板#include#include#includeusing namespace std;const int maxn=1e7+5;int ch[maxn][2];int sum[maxn];int le;void add(int x){ int p=1; for(int i=31;i>=0;i--) { int a=(x&(10;原创 2016-09-08 14:20:57 · 614 阅读 · 0 评论