自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 sgu 184. Patties 基础

184. Pattiestime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standard inputoutput: standard outputPetya is well-known with his famous cabbage patties. Petya's birthday will come very...

2018-04-30 17:17:41 192

原创 sgu 519. 3D City Model

519. 3D City ModelTime limit per test: 0.25 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardA city is built on the top of a rectangular n x m grid where all the grid cells are eq...

2018-04-30 16:46:05 139

原创 cf 967 c Stairs and Elevators 二分

C. Stairs and Elevatorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the year of 30XX30XX participants of some world programming championship...

2018-04-30 13:41:06 338

原创 sgu 172. eXam dfs二分图判定

172. eXamtime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standardoutput: standardIn Russia school pupils must do some exams before leaving school. Among others, they must do two "se...

2018-04-30 11:14:14 153

原创 sgu 347. Join the Strings 字符串比较

347. Join the StringsTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardHis Royal Highness King of Berland Berl XV was a very wise man and had a very accomp...

2018-04-30 01:55:35 169

原创 sgu 299. Triangle 大数

299. TriangleTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardIt is well known that three segments can make a triangle if and only if the sum of lengths of...

2018-04-29 17:41:23 102

原创 sgu 231. Prime Sum 素数筛选

231. Prime Sumtime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standardoutput: standardFind all pairs of prime numbers (A, B) such that A<=B and their sum is also a prime number a...

2018-04-29 16:04:25 183

原创 sgu 133. Border 贪心

133. Bordertime limit per test: 0.25 sec. memory limit per test: 4096 KBAlong the border between states A and B there are N defence outposts. For every outpost k, the interval [Ak,Bk] which is guarded...

2018-04-29 15:31:21 133

原创 sgu 551. Preparing Problem 优先队列或数学方法?

551. Preparing ProblemTime limit per test: 1 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardIt is not easy to prepare a problem for a programming contest. Petya and Vasya decide...

2018-04-29 14:09:09 254

原创 sgu 104. Little shop of flowers 动态规划找方案

104. Little shop of flowerstime limit per test: 0.25 sec. memory limit per test: 4096 KBPROBLEMYou want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers,...

2018-04-29 11:47:29 129

原创 sgu 154. Factorial 二分

154. Factorialtime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standard inputoutput: standard outputYou task is to find minimal natural number N, so that N! contains exactly Q zeroes...

2018-04-29 09:37:21 124

原创 sgu 111. Very simple problem 大数开方

111. Very simple problemtime limit per test: 0.25 sec. memory limit per test: 4096 KBYou are given natural number X. Find such maximum integer number that it square is not greater than X.InputInput fi...

2018-04-28 21:08:04 216

原创 sgu 题目总结。

codeforces上能交sgu上的老题了,什么时候可以刷完呢?100.A+B 101.欧拉回路102.欧拉函数104.动态规划,输出方案105.找规律107.找规律111.大数开方,我用的java二分。。。112.大数java用到快速输入输出,不要用Scanner113.素数115.水117.快速幂取模123.递推130.卡特兰数133.贪心134.树形dp135.找规律154.二分 阶乘找五1...

2018-04-28 17:02:44 638

原创 sgu 358. Median of Medians 中位数

358. Median of MediansTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardVasya learned definition of median of three numbers. He says, "Median of three numb...

2018-04-28 15:25:58 508

原创 sgu 105. Div 3 找规律

105. Div 3time limit per test: 0.25 sec. memory limit per test: 4096 KBThere is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determine amount of...

2018-04-28 15:14:33 178

原创 sgu 117. Counting 快速幂取模

117. Countingtime limit per test: 0.25 sec. memory limit per test: 4096 KBFind amount of numbers for given sequence of integer numbers such that after raising them to the M-th power they will be divid...

2018-04-28 14:44:20 154

原创 sgu 107. 987654321 problem 找规律

107. 987654321 problemtime limit per test: 0.25 sec. memory limit per test: 4096 KBFor given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to 9876...

2018-04-28 12:37:43 258

原创 sgu 102. Coprimes 欧拉函数

102. Coprimestime limit per test: 0.25 sec. memory limit per test: 4096 KBFor given integer N (1<=N<=104) find amount of positive numbers not greater than N that coprime with N. Let us call two ...

2018-04-28 11:58:14 126

原创 sgu 404. Fortune-telling with camomile 循环取余

404. Fortune-telling with camomileTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardMasha loves Petya. The following question gives her no rest: does Petya...

2018-04-28 09:49:12 166

原创 sgu 180. Inversions 树状数组

180. Inversionstime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standardoutput: standardThere are N integers (1<=N<=65537) A1, A2,.. AN (0<=Ai<=10^9). You need to find am...

2018-04-28 09:38:51 159

原创 sgu 499. Greatest Greatest Common Divisor 因数打表

499. Greatest Greatest Common DivisorTime limit per test: 0.5 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardAndrew has just made a breakthrough in sociology: he realized how to...

2018-04-27 23:06:21 257

原创 sgu 486. "Bulls and Cows"

486. "Bulls and Cows"Time limit per test: 0.25 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardYou probably know the game "bulls and cows". Just in case, we explain the rules. Th...

2018-04-27 20:39:29 112

原创 sgu 460. Plural Form of Nouns

460. Plural Form of NounsTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardIn the English language, nouns are inflected by grammatical number — that is sin...

2018-04-25 21:37:26 384

原创 sgu 403. Scientific Problem

403. Scientific ProblemTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardOnce upon a time Professor Idioticideasinventor was travelling by train. Watching ...

2018-04-25 21:22:03 250

原创 sgu 123. The sum 递推

123. The sumtime limit per test: 0.25 sec. memory limit per test: 4096 KBThe Fibonacci sequence of numbers is known: F1 = 1; F2 = 1; Fn+1 = Fn + Fn-1, for n>1. You have to find S - the sum of the f...

2018-04-25 20:52:27 118

原创 sgu 112 - a^b - b^a 大数

112. ab-batime limit per test: 0.25 sec. memory limit per test: 4096 KBYou are given natural numbers a and b. Find ab-ba.InputInput contains numbers a and b (1≤a,b≤100).OutputWrite answer to output.Sa...

2018-04-25 18:11:04 207

原创 a+b

#include <cstdio>#include <cstring>#include <iostream>using namespace std;char a[40005];char b[40005];void add(char *x,char *y){ char *w=x; int len1=strlen(x); ...

2018-04-25 17:20:21 101

原创 nim

#include <bits/stdc++.h>using namespace std;int v[100];int len(int x){ int now=0; while(x>0){ now++; x>>=1; } return now;}int main(){ int n;...

2018-04-25 13:57:24 224

原创 sgu 100 A+B

100. A+Btime limit per test: 0.25 sec. memory limit per test: 65536 KBRead integers A and B from input file and write their sum in output file.InputInput file contains A and B (0<A,B<10001).Outp...

2018-04-24 16:27:28 118

原创 cf 902 B. Coloring a Tree

B. Coloring a Treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree with n vertices. The vertices are numbered from 1 to ...

2018-04-23 16:50:30 197

原创 Ikki's Story I - Road Reconstruction POJ - 3204 最大流dfs染色

Ikki's Story I - Road ReconstructionTime Limit: 2000MS Memory Limit: 131072KTotal Submissions:8158 Accepted: 2363DescriptionIkki is the king of a small country – Phoenix, Phoenix is so small that ther...

2018-04-21 14:11:19 174

原创 Steady Cow Assignment POJ - 3189 二分差值最大流

Steady Cow AssignmentTime Limit: 1000MS Memory Limit: 65536KTotal Submissions:7173 Accepted: 2470DescriptionFarmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) bar...

2018-04-21 10:31:35 181

原创 POJ 2584 简单最大流 T-Shirt Gumbo

T-Shirt GumboTime Limit: 1000MS Memory Limit: 65536KTotal Submissions:3828 Accepted: 1819DescriptionBoudreaux and Thibodeaux are student volunteers for this year's ACM South Central Region's programmi...

2018-04-20 20:23:53 91

原创 Gold Transportation ZOJ - 2844 并查集 或 二分最大流

Gold TransportationTime Limit: 2 Seconds      Memory Limit: 65536 KBRecently, a number of gold mines have been discovered in Zorroming State. To protect this treasure, we must transport this gold to t...

2018-04-20 15:36:23 127

原创 Secret Milking Machine POJ - 2455 二分最大流

Farmer John is constructing a new milking machine and wishes to keep it secret as long as possible. He has hidden in it deep within his farm and needs to be able to get to the machine without being de...

2018-04-20 14:18:39 174

原创 Ombrophobic Bovines POJ - 2391 最短路二分最大流

Ombrophobic BovinesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions:20636 Accepted: 4433DescriptionFJ's cows really hate getting wet so much that the mere thought of getting caught in the rain...

2018-04-18 21:04:11 115

原创 POJ 2112 Optimal Milking 二分网络流

Optimal MilkingTime Limit: 2000MS Memory Limit: 30000KTotal Submissions:19179 Accepted: 6847Case Time Limit: 1000MSDescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the cow ...

2018-04-17 00:10:22 118

原创 二分 Jamie's Contact Groups poj 2289

Jamie's Contact GroupsTime Limit: 7000MS Memory Limit: 65536KTotal Submissions:8451 Accepted: 2871DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very lon...

2018-04-16 20:12:46 554

原创 poj 3281 Dining

DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions:21024 Accepted: 9319DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume...

2018-04-16 14:29:02 128

原创 POJ 1149 PIGS

PIGSTime Limit: 1000MS Memory Limit: 10000KTotal Submissions:22402 Accepted: 10243DescriptionMirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse because ...

2018-04-15 16:33:15 165

空空如也

空空如也

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

TA关注的人

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