![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
文章平均质量分 84
acm题解
皮蛋咸鱼白菜粥
这个作者很懒,什么都没留下…
展开
-
ZOJ - 3776 水题
Pokemon Master题目:Time Limit: 2000 msMemory Limit: 65536 KBCalemandSerenaare pokemon masters. One day they decided to have a pokemon battle practice before Pokemon World Championships. Each of...原创 2020-03-27 22:43:41 · 127 阅读 · 0 评论 -
HDU-2043
密码HDU - 2043题目:密码Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 90815Accepted Submission(s): 36244Problem Description网上流传一句话...原创 2020-03-26 22:53:29 · 184 阅读 · 0 评论 -
HDU - 2018
HDU - 2018题目:母牛的故事Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 147445Accepted Submission(s): 72491Problem Description有一头母牛,它...原创 2020-03-26 22:27:19 · 301 阅读 · 0 评论 -
HDU-1061
杭电1061 简单题题目:Rightmost DigitTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 85186Accepted Submission(s): 31372Problem Description...原创 2020-03-26 21:15:07 · 194 阅读 · 0 评论 -
最大公约数、最小公倍数求法,c语言实现
#include <stdio.h>int gcd(int a,int b){ while(a%b){ int c = a%b; a = b; b = c; } return b; //返回最大公约数}int main(){ int a,b; while(scanf("%d %d",&...原创 2020-03-24 00:06:28 · 102 阅读 · 0 评论 -
[codeforces 1293A] ConneR and the A.R.C. Markland-N
题目:http://codeforces.com/problemset/problem/1293/AA.R.C. Markland-N is a tall building withnnfloors numbered from11tonn. Between each two adjacent floors in the building, there is a staircase c...原创 2020-02-27 11:59:05 · 170 阅读 · 0 评论 -
ACM竞赛文件头
万能文件头:#include <bits/stdc++.h>文件头模板:#include<cstdio>#include<cstring>#include<algorithm>#include<iostream>#include<string>#include<vector>#include...原创 2020-02-26 22:24:39 · 215 阅读 · 0 评论 -
ACM注意事项(学习总结)
浮点型四舍五入 floor(x+0.5);类似算阶层这种运算量太大一般有规律,如25!末尾有六个0重定向文件输入输出 freopen("data.in", "r", stdin); freopen("data.out", "w",stdout);通过fopen,FILE等来输入输出多案例注意重置数据string.h中有memset(a,0,si...原创 2020-01-06 17:14:23 · 151 阅读 · 0 评论 -
Codeforces Round #486 (Div. 3) D. Points and Powers of Two
D. Points and Powers of Twotime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn distinct points on a coordinate line, the coordinate of ii...原创 2018-06-09 16:12:31 · 162 阅读 · 0 评论 -
Codeforces Round #488 by NEAR (Div. 2) A. Fingerprints
A. Fingerprintstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are locked in a room with a door that has a keypad with 10 keys corresponding to...原创 2018-06-17 15:39:58 · 268 阅读 · 0 评论 -
B. Knights of a Polygonal Table
B. Knights of a Polygonal Tabletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputUnlike Knights of a Round Table, Knights of a Polygonal Table depriv...原创 2018-06-17 15:45:20 · 479 阅读 · 0 评论 -
C. Two Squares
C. Two Squarestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two squares, one with sides parallel to the coordinate axes, and anothe...原创 2018-06-17 15:55:26 · 681 阅读 · 0 评论 -
A. Balloons Codeforces Round #493 (Div. 2)
A. Balloonstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are quite a lot of ways to have fun with inflatable balloons. For example, you can...原创 2018-07-02 12:46:20 · 165 阅读 · 0 评论 -
B. Cutting Codeforces Round #493 (Div. 2)
B. Cuttingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are a lot of things which could be cut — trees, paper, "the rope". In this problem...原创 2018-07-02 12:53:46 · 455 阅读 · 0 评论 -
C. Convert to Ones Codeforces Round #493 (Div. 2)
C. Convert to Onestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a string a1,a2,…,ana1,a2,…,an, consisting of zeros and ones.Let's call...原创 2018-07-02 13:03:58 · 227 阅读 · 0 评论 -
CodeForces 1141B Maximal Continuous Rest题解
Each day in Berland consists ofnnhours. Polycarp likes time management. That's why he has a fixed schedule for each day — it is a sequencea1,a2,…,ana1,a2,…,an(eachaiaiis either00or11), where...原创 2019-03-31 19:26:36 · 232 阅读 · 0 评论 -
B - Game 23 CodeForces - 1141A
B - Game 23 CodeForces - 1141APolycarp plays "Game 23". Initially he has a numbernnand his goal is to transform it tomm. In one move, he can multiplynnby22or multiplynnby33. He can per...原创 2019-03-31 19:37:32 · 226 阅读 · 0 评论 -
CodeForces 1141C Polycarp Restores Permutation
CodeForces 1141C Polycarp Restores PermutationAn array of integersp1,p2,…,pnp1,p2,…,pnis called apermutationif it contains each number from11tonnexactly once. For example, the following a...原创 2019-03-31 20:02:09 · 239 阅读 · 0 评论 -
FZU - 2107题解
Cao Cao was hunted down by thousands of enemy soldiers when he escaped from Hua Rong Dao. Assuming Hua Rong Dao is a narrow aisle (one N*4 rectangle), while Cao Cao can be regarded as one 2*2 grid. Cr...原创 2019-04-22 10:49:47 · 153 阅读 · 0 评论 -
2015浙江省赛May Day Holiday
题目:As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturday and Sunday, i...原创 2019-04-23 09:35:14 · 88 阅读 · 0 评论 -
2015浙江省赛Beauty of Array
Edward has an arrayAwithNintegers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to know the summation of the beauty of all contiguous ...原创 2019-04-23 09:40:26 · 80 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) F. Mentors
F. Mentorstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn BerSoft nn programmers work, the programmer ii is characterized by a skill riri.A pro...原创 2018-05-17 16:39:50 · 259 阅读 · 0 评论 -
Codeforces Round #486 (Div. 3) C. Equal Sums
C. Equal Sumstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given kk sequences of integers. The length of the ii-th sequence equals to ni...原创 2018-06-09 16:04:39 · 100 阅读 · 0 评论 -
Codeforces Round #486 (Div. 3) B. Substrings Sort
B. Substrings Sorttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given nn strings. Each string consists of lowercase English letters. Rear...原创 2018-06-09 15:59:37 · 128 阅读 · 0 评论 -
Codeforces Round #486 (Div. 3) A. Diverse Team
A. Diverse Teamtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn students in a school class, the rating of the ii-th student on Codehors...原创 2018-06-09 15:55:40 · 155 阅读 · 0 评论 -
Codeforces Round #257 (Div. 2) C. Jzzhu and Chocolate
C. Jzzhu and Chocolatetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputJzzhu has a big rectangular chocolate bar that consists of n × m unit squares...原创 2018-05-22 15:43:59 · 125 阅读 · 0 评论 -
Codeforces Round #257 (Div. 2) B. Jzzhu and Sequences
B. Jzzhu and Sequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputJzzhu has invented a kind of sequences, they meet the following property:You ...原创 2018-05-22 15:40:15 · 246 阅读 · 0 评论 -
Educational Codeforces Round 44 (Rated for Div. 2) B. Switches and Lamps
B. Switches and Lampstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n switches and m lamps. The i-th switch turns on some subset of...原创 2018-05-22 15:18:01 · 154 阅读 · 0 评论 -
Educational Codeforces Round 44 (Rated for Div. 2) A. Chess Placing
A. Chess Placingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a chessboard of size 1 × n. It is guaranteed that n is even. The ches...原创 2018-05-22 15:10:35 · 115 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) G. Petya's Exams
G. Petya's Examstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya studies at university. The current academic year finishes with nn special day...原创 2018-05-17 16:56:24 · 171 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) E. Bus Video System
E. Bus Video Systemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe busses in Berland are equipped with a video surveillance system. The system ...原创 2018-05-17 16:29:54 · 279 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) D. Almost Arithmetic Progression
D. Almost Arithmetic Progressiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp likes arithmetic progressions. A sequence [a1,a2,…,an][a1,...原创 2018-05-17 16:24:22 · 393 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) C. Letters
C. Letterstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn dormitories in Berland State University, they are numbered with integers fr...原创 2018-05-17 16:17:18 · 687 阅读 · 0 评论 -
Codeforces Round #481 (Div. 3) A. Remove Duplicates
A. Remove Duplicatestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya has an array aa consisting of nn integers. He wants to remove duplicate (...原创 2018-05-17 16:01:14 · 184 阅读 · 0 评论 -
Codeforces Round #254 (Div. 2) B. DZY Loves Chemistry
B. DZY Loves Chemistrytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves chemistry, and he enjoys mixing chemicals.DZY has n chemicals, and ...原创 2018-05-22 15:52:04 · 103 阅读 · 0 评论 -
Educational Codeforces Round 44 (Rated for Div. 2) C. Liebig's Barrels
C. Liebig's Barrelstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have m = n·k wooden staves. The i-th stave has length ai. You have to assem...原创 2018-05-23 13:42:46 · 138 阅读 · 0 评论 -
A. Nastya and an Array
A. Nastya and an Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNastya owns too many arrays now, so she wants to delete the least important o...原创 2018-06-21 08:42:38 · 317 阅读 · 0 评论 -
Codeforces Round #487 (Div. 2) C. A Mist of Florescence
C. A Mist of Florescencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs the boat drifts down the river, a wood full of blossoms shows up on the ...原创 2018-06-12 18:01:27 · 140 阅读 · 0 评论 -
Educational Codeforces Round 45 (Rated for Div. 2) C. Bracket Sequences Concatenation Problem
C. Bracket Sequences Concatenation Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA bracket sequence is a string containing only character...原创 2018-06-12 17:01:45 · 87 阅读 · 0 评论 -
Codeforces Beta Round #92 (Div. 2 Only) A. The number of positions
A. The number of positionstime limit per test0.5 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetr stands in line of n people, but he doesn't know exactly which posi...原创 2018-05-29 15:52:32 · 104 阅读 · 0 评论