自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 0726 G. Goblin Garden Guards

告诉哥布林个数,坐标,喷水头的个数,坐标,有效半径求没有被喷到水的哥布林数哥布林在同一个位置可能同时存在多个开int [10000][10000]会爆空间要用bool #include<math.h>#include <iostream>//int ma[10000][10000]会爆空间//算半径,算半径,不要直接算坐标using name...

2018-07-28 19:07:41 269

原创 0726 E. Entertainment Box

Nordic Collegiate Programming Contest 2015​贪心问题+数据结构给出任务总数与同时进行的个数给出开始与结束,求最多能完成几个任务根据贪心原则,要按结束时间从小到大排序,相同的则开始时间大的排前面最开始直接模拟,会超时的要用multise才行复杂度要NlogN/*题意:输入n,k 表示有n场电视节目,最多可以同时录制k场,然...

2018-07-28 19:01:42 204

原创 0726 D. Disastrous Downtime

给出总任务数和单个服务器能同时运行任务的个数,求最少要几个服务器才能完全容纳任务一个任务持续1000秒模拟,算出任务峰值/单个服务器能同时运行任务的个数,再向上取整即可#include <iostream>#include<math.h>#include<algorithm>using namespace std;int sz[100002]...

2018-07-28 18:55:50 274

原创 0726 C. Cryptographer's Conundrum

#include <iostream>#include<string.h>//水题,把一串字母变成perper。。,一天变一个,需要几天using namespace std;char s[301];int main(){    int ans=0;    scanf("%s",&s);    for(int i=0; i<strlen(s)...

2018-07-28 18:49:41 273

原创 20180717 F-Moving On

The 2018 ACM-ICPC Chinese Collegiate Programming Contest#include <iostream>#include<algorithm>using namespace std;/*算法是Floyd,按危险值从小到大排序城市编号(间接排序),然后用的dp[][][]记录最短路。dp[k][i][j]表示 ...

2018-07-21 20:36:43 524

原创 20170717 B. Rolling The Polygon

The 2018 ACM-ICPC Chinese Collegiate Programming Contest弧长=圆心角(弧度制)×半径注:double是 %lf , long long 是 %lld;通过余弦定理算∠p0p1p2,实际转过的角是π-∠p0p1p2;或者通过向量算角度要方便一点 #include <iostream>#include<...

2018-07-20 17:13:28 382

原创 20170717 A. Maximum Element In A Stack

The 2018 ACM-ICPC Chinese Collegiate Programming ContestAs an ACM-ICPC newbie, Aishah is learning data structures in computer science. She has already known that a stack, as a data structure, can se...

2018-07-19 13:08:54 549

原创 20180717 H. Fight Against Monsters

The 2018 ACM-ICPC Chinese Collegiate Programming ContestIt is my great honour to introduce myself to you here.My name is Aloysius Benjy Cobweb Dartagnan Egbert Felix Gaspar Humbert Ignatius Jayden K...

2018-07-17 17:09:30 410

原创 20180717 D. Take Your Seat

The 2018 ACM-ICPC Chinese Collegiate Programming ContestDuha decided to have a trip to Singapore by plane.The airplane had nn seats numbered from 11 to nn, and nn passengers including Duha which w...

2018-07-17 17:06:02 1131

原创 20180717 C. Caesar Cipher

The 2018 ACM-ICPC Chinese Collegiate Programming ContestIn cryptography, a Caesar cipher, also known as the shift cipher, is one of the most straightforward and most widely known encryption techniqu...

2018-07-17 17:03:26 686

原创 关于deepin下的codeblocks的运行问题

小白一个,搞了半天首先要安装g++sudo apt-get install g++接着检查编译器的路径一般是/usr最后路经中不能有中文,不然一直显示不能build使用xterm -T $TITLE -e 终端不能用ctrl+c复制,也不能用鼠标右键。。。网上说改为gnome-terminal -t $TITLE -x  但改了后没有显示控制台了。。。。。并且显示  Process termina...

2018-07-14 14:28:37 1129 1

原创 20180711 F-Divisions

大质数的分解用到了网上的模板如:12=2^2*3^1则答案为(2+1)×(1+1)=6注意:质数为2,1为1#include<stdio.h>#include<string.h>#include<stdlib.h>#include<time.h>#include<iostream>#include<algorithm>usin...

2018-07-14 14:14:52 243

原创 20180711 I-Milling machines

给出4个数w,s,x,yw是工件个数,s是刀的个数,x是工件与刀的宽度,y是工件与刀的最大值开二维数组存储,并算出刀的最大值工件长度+刀长<=y则工件长度不变,否则工件长度=y-刀的长度注意格式:每行的最后一个没有空格#include <iostream>#include<cstdio>using namespace std;int machin[10002][101...

2018-07-14 00:27:54 262

原创 2018/07/11 G. Extreme Sort

英语阅读题,前面讲了一堆高大上的东西,最后不会让你用只需要判断一些数是按顺序排列就行。#include <iostream>using namespace std;int sz[1025],n;int main(){    int flag=0,temp=0;    cin>>n;    for(int i=0;i<n;i++)        cin>>s...

2018-07-13 23:39:25 174

原创 20180711 K. Upside down primes

标准答案:#include <iostream>#include <string>#include <cstdlib>using namespace std;string s;bool prime(string n) { long long num = atol(n.c_str()); if (num == 2) return true; if (num == ...

2018-07-13 21:17:11 283

空空如也

空空如也

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

TA关注的人

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