codeforce
mrhao61
这个作者很懒,什么都没留下…
展开
-
1143 B. Nirvana
#include<cstdio>#include<iostream>#include<algorithm>#include<string>#include<cmath>#include<cstring>#include<cstdlib>using namespace std;typedef long...原创 2019-11-16 17:24:13 · 215 阅读 · 0 评论 -
30A. Accounting 大佬水整数幂的步骤 .......
A. Accountingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA long time ago in some far country lived king Copa. After the recent king’s ref...原创 2019-11-16 17:24:04 · 192 阅读 · 0 评论 -
1136A. Nastya Is Reading a Book by李博浩
A. Nastya Is Reading a Booktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter lessons Nastya decided to read a book. The book contains n ch...原创 2019-11-16 17:21:45 · 275 阅读 · 0 评论 -
1138A. Sushi for Two by 李博浩
A. Sushi for Twotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady invited Anna for a dinner to a sushi restaurant. The restaurant is a bi...原创 2019-11-16 17:21:38 · 653 阅读 · 0 评论 -
58A. Chat room by 李博浩
A. Chat roomtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has recently learned to type and log on to the Internet. He immediately ente...原创 2019-11-16 17:21:31 · 257 阅读 · 0 评论 -
96A. Football by李博浩
A. Footballtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya loves football very much. One day, as he was watching a football match, he w...原创 2019-11-16 17:20:58 · 162 阅读 · 0 评论 -
1040B. Shashlik Cooking by lbh 这题 一开始没看懂,有时间再看一下
B. Shashlik Cookingtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputLong story short, shashlik is Miroslav’s favorite food. Shashlik is prepare...原创 2019-11-16 17:23:30 · 238 阅读 · 0 评论 -
816B. Karen and Coffee by 李博浩 20000的数组而已
在这里插入代码片原创 2019-11-16 17:23:36 · 175 阅读 · 0 评论 -
946C. String Transformation by 李博浩 这应该是最简单的C题了吧
C. String Transformationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s consisting of |s| small english letters.In o...原创 2019-11-16 17:23:42 · 285 阅读 · 0 评论 -
A. Game 23 这道题第一次竟然做错了
A. Game 23time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp plays “Game 23”. Initially he has a number n and his goal is to transform i...原创 2019-11-16 17:23:22 · 1617 阅读 · 0 评论 -
1132A. Regular Bracket Sequence bymrhao61
#include<iostream>using namespace std;int main(){ int a[5];int flag1=0,flag2=0; for(int i=1;i<=4;i++)cin>>a[i]; if(a[1]==a[4]&&a[1]>0) { flag1=1; } if(a[1]==0&...原创 2019-11-16 17:24:35 · 198 阅读 · 0 评论 -
1143A. The Doors by mrhao61
#include<iostream>#define max 200009using namespace std;int main(){ long long int n;cin>>n; int a[max],ans; for(int i=1;i<=n;i++) { cin>>a[i]; } for(int i=n;i>=1;i-...原创 2019-11-16 17:24:20 · 199 阅读 · 0 评论 -
1133C. Balanced Team BY MRHAO61 uppper_bound(begin,end,num)//从begin到end,返回小于等于num在数组中的下角标
C. Balanced Teamtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are a coach at your local university. There are n students under your sup...原创 2019-11-16 17:24:47 · 349 阅读 · 0 评论 -
1133B. Preparation for International Women's Day bymrhao61 如果超时就随时处理
B. Preparation for International Women’s Daytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputInternational Women’s Day is coming soon! Polycar...原创 2019-11-16 17:25:10 · 185 阅读 · 0 评论 -
1133A. Middle of the Contest
A. Middle of the Contesttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is going to participate in the contest. It starts at h1:m1 an...原创 2019-11-16 17:25:20 · 231 阅读 · 0 评论 -
1139C C. Edgy Trees by LBH 快速幂 图的连通块计数
#include <iostream>#include <algorithm>#include <vector>#include <queue>using namespace std;typedef long long ll;const int N = 1e5 + 5;const ll mod = 1e9 + 7;int n, k;...原创 2019-11-16 17:25:50 · 173 阅读 · 0 评论 -
1139 B. Chocolates bymrhao61 vector<int>a可以直接传入long long int ,long long 很重要
这道题告诉我们long long 真的很重要#include<iostream>#include<vector>using namespace std;int main(){ long long int ans=0,max=0; long long int n;cin>>n; vector<int>a; for(long long ...原创 2019-11-16 17:25:58 · 298 阅读 · 0 评论 -
1149A. Even Substrings by mrhao61 每个字符转换成数字存在数组里会超时
不知道为什么之前一个一个的转换成数字存在数组里会超时#include<iostream>#include<vector>using namespace std;int main(){ int n;cin>>n; int ans=0; char a[65003];cin>>a; for(int i=0;i<n;i++) { ...原创 2019-11-16 17:26:05 · 180 阅读 · 0 评论 -
1132 B. Discounts by mrhao61
#include<iostream>#include<algorithm>#include<vector>using namespace std;bool cmp(long long int a,long long int b){ return a>b;}int main(){ long long int n,m;cin>>...原创 2019-11-16 17:24:28 · 253 阅读 · 0 评论 -
1016B. Segment Occurrences
#include<string.h>#include<iostream>using namespace std;int n,m,q,a[1000+10];int main(){ string s,t; cin>>n>>m>>q; cin>>s>>t; for(int i=0...原创 2019-11-16 17:23:51 · 115 阅读 · 0 评论 -
codeforce 888A. Local Extrema by李博浩
#include<iostream>using namespace std;int main(){ int n;cin>>n; int a[1010]; for(int i=0;i<n;i++) { cin>>a[i]; } int ans=0; for(int i=1;i<n-1;i++) { if(a[i]>...原创 2019-11-16 17:22:48 · 128 阅读 · 0 评论 -
codeforce 867A by 李博浩
#include<iostream> using namespace std;int main(){ int n;cin>>n; int p=0,q=0; char a[200]; for(int i=0;i<n;i++) { cin>>a[i]; if(i&&a[i]!=a[i-1]) { if(a[i]...原创 2019-11-16 17:22:41 · 166 阅读 · 0 评论 -
158AA. Next Round by李博浩
A. Next Roundtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output“Contestant who earns a score equal to or greater than the k-th place finisher’s...原创 2019-11-16 17:20:05 · 221 阅读 · 0 评论 -
http://codeforces.com/problemset/problem/71/A
http://codeforces.com/problemset/problem/71/A第一次代码#include&lt;iostream&gt;#include&lt;string&gt;using namespace std;int main(){ int n; cin&gt;&gt;n; while(n) { string s; cin&gt;&原创 2019-11-16 17:19:58 · 230 阅读 · 0 评论 -
776B. Sherlock and his girlfriend by 李博浩 判断素数输出1,2不同颜色,细思极恐怎么输出都只有11和2
B. Sherlock and his girlfriendtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSherlock has a new girlfriend (so unlike him!). Valentine’s day ...原创 2019-11-16 17:22:27 · 166 阅读 · 0 评论 -
935B. Fafa and the Gates by 李博浩
B. Fafa and the Gatestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo neighboring kingdoms decided to build a wall between them with some ...原创 2019-11-16 17:22:20 · 134 阅读 · 0 评论 -
977C. Less or Equal by李博浩 这个题b事不少
C. Less or Equaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence of integers of length n and integer number k. You sh...原创 2019-11-16 17:22:12 · 187 阅读 · 0 评论 -
450B. Jzzhu and Sequences by李博浩 modulo10^9+7
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...原创 2019-11-16 17:22:08 · 426 阅读 · 0 评论 -
919B. Perfect Number by李博浩
B. Perfect Numbertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe consider a positive integer perfect, if and only if the sum of its digits...原创 2019-11-16 17:22:00 · 156 阅读 · 0 评论 -
118A A. String Task BY 李博浩
A. String Tasktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya started to attend programming lessons. On the first lesson his task was t...原创 2019-11-16 17:20:12 · 136 阅读 · 0 评论 -
231A. Team by 李博浩
A. Teamtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day three best friends Petya, Vasya and Tonya decided to form a team and take part...原创 2019-11-16 17:20:19 · 264 阅读 · 0 评论 -
158B. Tax iby 李博浩
B. Taxitime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the lessons n groups of schoolchildren went outside and decided to visit Polycar...原创 2019-11-16 17:21:02 · 154 阅读 · 0 评论 -
1183B. Circus by 李博浩
B. Circustime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is a head of a circus troupe. There are nn — an even number — artists in the...原创 2019-11-16 17:21:08 · 290 阅读 · 0 评论 -
766A. Mahmoud and Longest Uncommon Subsequence by李博浩
A. Mahmoud and Longest Uncommon Subsequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhile Mahmoud and Ehab were practicing for IOI, th...原创 2019-11-16 17:20:46 · 150 阅读 · 0 评论 -
758A. Holiday Of Equality by李博浩
A. Holiday Of Equalitytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland it is the holiday of equality. In honor of the holiday the ki...原创 2019-11-16 17:21:17 · 160 阅读 · 0 评论 -
520A. Pangram by李博浩
A. Pangramtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA word or a sentence in some language is called a pangram if all the characters of ...原创 2019-11-16 17:20:40 · 175 阅读 · 0 评论 -
112A. Petya and Strings by李博浩
A. Petya and Stringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya loves presents. His mum bought him two strings of the same s...原创 2019-11-16 17:20:36 · 134 阅读 · 0 评论 -
282A. Bit++ by李博浩
A. Bit++time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe classic programming language of Bitland is Bit++. This language is so peculiar and...原创 2019-11-16 17:20:28 · 199 阅读 · 0 评论 -
50A. Domino piling by 李博浩
50A. Domino pilingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rectangular board of M × N squares. Also you are given an u...原创 2019-11-16 17:20:23 · 149 阅读 · 0 评论 -
200B. Drinks by李博浩
B. Drinkstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vasya loves orange juice very much. That’s why any food and drink in his kitc...原创 2019-11-16 17:21:55 · 233 阅读 · 0 评论