
sgu !!!!!!!!!!
文章平均质量分 67
superkunn
这个作者很懒,什么都没留下…
展开
-
sgu 217. Two Cylinders 积分
217. Two Cylinderstime limit per test: 0.5 sec.memory limit per test: 65536 KBinput: standardoutput: standardIn this problem your task is very simple. Consider two infinite cylinders in three-dimensio...原创 2018-05-27 18:10:06 · 215 阅读 · 0 评论 -
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 · 192 阅读 · 0 评论 -
sgu 538. Emoticons 水
538. EmoticonsTime limit per test: 1 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardA berland national nanochat Bertalk should always stay up-to-date. That's why emoticons highl...原创 2018-05-07 17:44:31 · 209 阅读 · 0 评论 -
sgu 549. Dumbbells 排序
549. DumbbellsTime limit per test: 1 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardA sports shop has n dumbbells in store. Each of them is characterised by its mass mi and cost...原创 2018-05-20 19:33:37 · 345 阅读 · 0 评论 -
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 · 115 阅读 · 0 评论 -
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 · 211 阅读 · 0 评论 -
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 · 149 阅读 · 0 评论 -
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 · 280 阅读 · 0 评论 -
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 · 154 阅读 · 0 评论 -
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 · 144 阅读 · 0 评论 -
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 · 235 阅读 · 0 评论 -
sgu 222. Little Rooks 组合数学
222. Little Rookstime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardInspired by a "Little Bishops" problem, Petya now wants to solve problem for rooks. A rook ...原创 2018-05-20 20:18:21 · 332 阅读 · 0 评论 -
sgu 181. X-Sequence 答案出现循环
181. X-Sequencetime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standardoutput: standardLet {xi} be the infinite sequence of integers: 1) x0 = A; 2) xi = (alpha * xi-1^2 + beta * xi-...原创 2018-05-20 21:24:33 · 220 阅读 · 0 评论 -
sgu 134. Centroid 树形dp
134. Centroidtime limit per test: 0.25 sec. memory limit per test: 4096 KBYou are given an undirected connected graph, with N vertices and N-1 edges (a tree). You must find the centroid(s) of the tree...原创 2018-05-07 21:01:21 · 208 阅读 · 0 评论 -
sgu 118 Digital Root 数学规律
118. Digital Roottime limit per test: 0.25 sec. memory limit per test: 4096 KBLet f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherw...原创 2018-05-16 19:07:35 · 268 阅读 · 0 评论 -
sgu 406. Goggle
406. GoggleTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardEverybody knows search engine Goggle. But only advanced users know that it is possible to sear...原创 2018-05-27 13:56:17 · 221 阅读 · 0 评论 -
sgu 296. Sasha vs. Kate 贪心
296. Sasha vs. KateTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardDuring the regular Mars's World Finals Subregional Programming Contest a boy Sasha lost...原创 2018-05-27 13:25:23 · 168 阅读 · 0 评论 -
sgu 259. Printed PR 贪心
259. Printed PRtime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardSmall PR-agency got an order to print a very big lot of agitational materials. Agency should ...原创 2018-05-27 12:42:05 · 237 阅读 · 0 评论 -
sgu 116. Index of super-prime 背包
116. Index of super-primetime limit per test: 0.25 sec. memory limit per test: 4096 KBLet P1, P2, … ,PN, … be a sequence of prime numbers. Super-prime number is such a prime number that its current nu...原创 2018-05-22 19:02:12 · 227 阅读 · 0 评论 -
sgu 175. Encoding 二分模拟
175. Encodingtime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standardoutput: standardLet phi(W) is the result of encoding for algorithm: 1. If the length of W is 1 then phi(W) is W;...原创 2018-05-22 15:24:38 · 158 阅读 · 0 评论 -
sgu 127. Telephone directory
127. Telephone directorytime limit per test: 0.25 sec. memory limit per test: 4096 KBCIA has decided to create a special telephone directory for its agents. The first 2 pages of the directory contain ...原创 2018-05-22 10:51:02 · 209 阅读 · 0 评论 -
sgu 405. Totalizator 简单模拟
405. TotalizatorTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardSome time ago Vasya was cleaning up the garret. After the hours of hard work he suddenly ...原创 2018-05-22 09:51:01 · 189 阅读 · 0 评论 -
sgu 443. Everlasting...? 素数筛
443. Everlasting...?Time limit per test: 0.5 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardEverlasting Sa-Ga, a new, hot and very popular role-playing game, is out on October 1...原创 2018-05-22 08:47:54 · 256 阅读 · 0 评论 -
sgu 302. BHTML 1.0 栈
302. BHTML 1.0Time limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardThe hypertext markup language BHTML 1.0 has only two paired tags. They are UP /UP and DOWN ...原创 2018-05-25 21:03:50 · 161 阅读 · 0 评论 -
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 · 678 阅读 · 0 评论 -
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 · 542 阅读 · 0 评论 -
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 · 423 阅读 · 0 评论 -
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 · 269 阅读 · 0 评论 -
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 · 145 阅读 · 0 评论 -
sgu 398. Friends of Friends 集合set
398. Friends of FriendsTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardSocial networks are very popular now. They use different types of relationships to...原创 2018-05-03 17:15:12 · 286 阅读 · 0 评论 -
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 · 232 阅读 · 0 评论 -
sgu 113. Nearly prime numbers 素数
113. Nearly prime numberstime limit per test: 0.25 sec. memory limit per test: 4096 KBNearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that give...原创 2018-05-02 20:45:34 · 158 阅读 · 0 评论 -
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 · 143 阅读 · 0 评论 -
sgu 101. Domino 欧拉回路
101. Dominotime limit per test: 0.25 sec. memory limit per test: 4096 KBDominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of dots, or pips, o...原创 2018-05-01 11:40:00 · 179 阅读 · 0 评论 -
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 · 209 阅读 · 0 评论 -
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 · 163 阅读 · 0 评论 -
sgu 275. To xor or not to xor 线性基
275. To xor or not to xortime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardThe sequence of non-negative integers A1, A2, ..., AN is given. You are to find som...原创 2018-05-03 20:37:40 · 184 阅读 · 0 评论 -
sgu 115. Calendar 水
115. Calendartime limit per test: 0.25 sec. memory limit per test: 4096 KBFirst year of new millenium is gone away. In commemoration of it write a program that finds the name of the day of the week fo...原创 2018-05-03 20:53:14 · 123 阅读 · 0 评论 -
sgu 130. Circle 卡特兰数
130. Circletime limit per test: 0.25 sec. memory limit per test: 4096 KBOn a circle border there are 2k different points A1, A2, ..., A2k, located contiguously. These points connect k chords so that e...原创 2018-05-04 15:31:38 · 138 阅读 · 0 评论 -
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 · 202 阅读 · 0 评论