自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 安装ubuntu之后,win7开机前的画面变成紫色花屏的解决办法

在/etc/default里的grub文件中修改两部分:1.修改启动顺序sudo vim /etc/default/grub进入文件,GRUB_DEFAULT=0的作用是设置默认启动项,这里默认启动的是ubuntu。我的电脑里win7的启动项是第5个,所以把0改为42.在网上看到的办法将#GRUB_TERMINAL=CONSOLE这里的注释消掉。因为系统启动时会先加载ubu...

2020-03-01 09:55:10 787

原创 pip用清华源配置各种包

清华源:pip install -ihttps://pypi.tuna.tsinghua.edu.cn/simplesklearn<——安装sklearn包

2019-12-20 23:08:11 945

原创 Need for Speed(二分

Sheila is a student and she drives a typical student car: it is old, slow, rusty, and falling apart. Recently, the needle on the speedometer fell off. She glued it back on, but she might have placed i...

2018-04-01 22:03:10 296

原创 通用版2.U

A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the same length l and each item i has length li&lt;=l . We look for a minimal number of bins q such that each ...

2018-02-23 20:30:28 194

原创 通用版2.T

The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 &lt;= N &lt;= 10,000) weeks, the price of milk and labor will fluctuate weekly such that it will cost ...

2018-02-23 20:02:28 156

原创 通用版2.S

A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the s...

2018-02-19 12:50:52 198

原创 通用版2.R

Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose level below this task’s level yi cannot complete ...

2018-02-19 12:47:14 253

原创 通用版2.Q

When playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are killed, and you have to fight 1vN. There are two key attributes for...

2018-02-19 10:28:40 154

原创 通用版2.P

Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after th...

2018-02-19 10:20:51 150

原创 通用版2.K - Big Number

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;#include &lt;math.h&gt;int main(){ int t,i; //int n; double ans,n; scanf("%d",&amp;t); while(t--){ scanf("%lf",&amp;n);...

2018-02-19 00:48:06 154

原创 通用版2.J - 归并排序求逆序对

#include &lt;iostream&gt;#include &lt;stdio.h&gt;#include &lt;string.h&gt;#include &lt;algorithm&gt;using namespace std;struct node{ int num; char c[60];}s[110];bool cmp(node a,node b)...

2018-02-19 00:31:49 172

原创 通用版2.I - Safecracker (待看

=== Op tech briefing, 2002/11/02 06:42 CST === "The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his...

2018-02-19 00:26:14 335

原创 通用版2.G

In a speech contest, when a contestant finishes his speech, the judges will then grade his performance. The staff remove the highest grade and the lowest grade and compute the average of the rest as t...

2018-02-18 23:28:35 229

原创 通用版2.E

FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The warehouse has N rooms. The i-th room contains J[i] pounds of Jav...

2018-02-18 23:27:24 246

原创 通用版2.D

Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his enemies. His pla...

2018-02-18 23:07:59 128

原创 通用版2.C

夏天来了~~好开心啊,呵呵,好多好多水果~~ Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Input第一行正整数N(0&lt;N&lt;=10)表示有N组测试数据. 每组测试数据的第一行是一个整数M(0&lt;M&lt;=100),表示工有M次成功的交易.其后有M行数据,每行表示一次交...

2018-02-18 23:00:56 207

原创 通用版2.B

Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want ...

2018-02-18 22:36:09 136

原创 通用版2.A

Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will cou...

2018-02-18 22:13:28 468

原创 通用版1.X - Specialized Four-Digit Numbers

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int f(int x,int a){ int s=0; while(x){ s+=x%a; x=x/a; } // printf("%d,;\n",x); return s;}int main(){ int i...

2018-02-18 21:53:29 131

原创 通用版1.W - The Circumference of the Circle

#include &lt;stdio.h&gt;#include &lt;math.h&gt;#define pi 3.141592653589793int main(){ int i,j; double x1,x2,x3,y1,y2,y3,r,k,b,x,y; while(~scanf("%lf%lf%lf%lf%lf%lf",&amp;x1,&amp;y1,&a...

2018-02-18 21:40:59 154

原创 通用版1.V - The Fun Number System

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(){ int t,k,i; long long n; char s[100],f[100]; scanf("%d",&amp;t); while(t--){ scanf("%d%s%lld",&amp;k,s,&amp;...

2018-02-18 21:34:54 174

原创 U - Long Distance Racing

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(){ int m,t,U,F,D,i,x; while(~scanf("%d%d%d%d%d",&amp;m,&amp;t,&amp;U,&amp;F,&amp;D)){ int ans=0,s=0,flag=0; char c...

2018-02-18 20:37:05 144

原创 通用版1.S - Counterfeit Dollar

#include &lt;stdio.h&gt;#include &lt;string.h&gt;#include &lt;math.h&gt;int main()//这个题一直以为是固定放四个,结果一直WA,唉{ int s[15],f[15],i,j,t; char x[4][10],y[4][10],z[4][10]; scanf("%d",&amp;t);...

2018-02-18 20:26:13 315

原创 通用版1.R - Joseph

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(){ int k,m,a,i,j,s[15],flag,t; for(i=1;i&lt;=13;i++){ for(j=i+1;;j++){ //a=i; flag=0; ...

2018-02-18 20:03:54 141

转载 通用版1.P - Reduced ID Numbers

#include &lt;stdio.h&gt;#include &lt;string.h&gt;int s[350],f[1000001];int main(){ int t,n,i,j,flag; scanf("%d",&amp;t); while(t--){ scanf("%d",&amp;n); for(i=0;i&lt;=n...

2018-02-18 19:33:38 189

原创 通用版1.O - Dirichlet's Theorem on Arithmetic Progressions

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int isprime(int x){ int i; if(x&lt;=1)return 0; for(i=2;i&lt;=x/i;i++){ if(x%i==0)return 0; } return 1;}int main(){ ...

2018-02-18 19:16:05 203

原创 通用版1.N - Bullseye

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;#include &lt;math.h&gt;double f(double x){ if(x&lt;=9)return 100; if(x&lt;=36)return 80; if(x&lt;=81)return 60; if(x&lt;=144)retur...

2018-02-18 19:01:03 137

原创 通用版1.M - 枚举答案能不能做?

#include &lt;stdio.h&gt;#include &lt;string.h&gt;int main(){ int i,n,t; char s[10000]; while(gets(s)){ if(strcmp(s,"0")==0)break; n=strlen(s); int ans=0; ...

2018-02-18 14:58:31 133

原创 通用版1.L - Delta-wave

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;#include &lt;math.h&gt;int main(){ int a,b,x1,y1,z1,x2,y2,z2,res,n,m; while(~scanf("%d%d",&amp;n,&amp;m)){ //a=sqrt(n); a=(...

2018-02-18 14:51:40 228

原创 通用版1.K - next_permutation

#include &lt;iostream&gt;#include &lt;algorithm&gt;#include &lt;stdio.h&gt;using namespace std;int main(){ int n,m,i,s[1010]; while(scanf("%d%d",&amp;n,&amp;m)!=EOF){ for(i=0;i&...

2018-02-18 14:36:43 175

原创 通用版1.J - Ignatius and the Princess IV

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(){ int i,j,k,n,t; while(~scanf("%d",&amp;n)){ int count=0; for(i=0;i&lt;=n-1;i++){ scanf("%d",&amp;k);...

2018-02-18 14:25:17 126

原创 通用版1.I - 辗转相除法求最大公约数

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(){ int n,a,t,u,v,r,s,w; scanf("%d",&amp;w); while(w--){ scanf("%d",&amp;n); int count=1; //scanf("%d",&am

2018-02-18 13:58:51 145

原创 通用版1.H - 请使用sort

#include &lt;iostream&gt;#include &lt;algorithm&gt;#include &lt;stdio.h&gt;#include &lt;string.h&gt;#include &lt;stdlib.h&gt;using namespace std;int n,m,k,i,j;double num;struct node{ int...

2018-02-18 12:34:39 189

原创 通用版1.F - Robot Motion (深搜

#include &lt;stdio.h&gt;#include &lt;string.h&gt;int r,c,n,record[11][11],f[11][11],step;char s[11][11];void dfs(int x,int y){ int nx,ny; step++; if(x&lt;0||x&gt;=r||y&lt;0||y&gt;=c){...

2018-02-18 12:18:56 155

原创 通用版1.E - A + B

#include &lt;stdio.h&gt;#include &lt;string.h&gt;int main(){ int i=0,j,u,v,a,b,n; char s[10][15],f[150]; int mark[10]; strcpy(s[0],"zero"); strcpy(s[1],"one"); strcpy(s[2],...

2018-02-18 10:53:13 148

原创 通用版1.C - Edge

#include &lt;stdio.h&gt;#include &lt;string.h&gt;int main(){ int i,j,n; char s[250],x; while(~scanf("%s",s)){ n=strlen(s); int a=300,b=420,d=1; printf("%d %d mo...

2018-02-18 10:31:19 125

原创 通用版1.B - Candy Sharing Game

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int s[1000000];int main(){ int n,i,k,flag,a,b; while(scanf("%d",&amp;n)&amp;&amp;n){ for(i=0;i&lt;=n-1;i++){ scanf("%d"...

2018-02-17 23:20:37 189

原创 通用版1.A - The 3n + 1 problem

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int f(int x){ int i=0; while(1){ if(x==1)break; if(x%2==0)x=x/2; else x=3*x+1; i++; } return i+1;}...

2018-02-17 23:13:46 136

原创 水题堆4.M - 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活

#include &lt;stdio.h&gt;#include &lt;string.h&gt;int max(int a,int b){ return a&gt;b?a:b;}int main(){ int C,n,m,i,j,k; int s[200],p[200],h[200],c[200]; scanf("%d",&amp;C); wh...

2018-02-17 23:02:55 174

原创 水题堆4.L - 悼念512汶川大地震遇难同胞——重建希望小学

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;int main(){ int c,n,i; long long s[35]; s[1]=1; s[2]=3; for(i=3;i&lt;=31;i++){ s[i]=2*s[i-2]+s[i-1]; } scanf("%...

2018-02-17 23:00:25 243

空空如也

空空如也

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

TA关注的人

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