
思维题
文章平均质量分 79
Let_life_stop
和强者对战才是提升自己最快的方法。
展开
-
日常训练赛 Problem C – Complete Naebbirac’s sequence
比赛链接https://vjudge.net/contest/256988#status/17111202012/C/0/大意:三个操作,使得输入的数中,从1-n,每一个数出现的次数相同。 wa代码(只是考虑了三个数的情况):#include<iostream>#include<string>#include<map>#include&l...原创 2018-10-02 23:49:25 · 360 阅读 · 0 评论 -
简单计算器
#include<bits/stdc++.h>using namespace std;double a[2000];int main(){ char c; double n; while(cin>>n) { a[0]=n; if(n==0) { c=getc...原创 2018-08-17 08:44:03 · 413 阅读 · 0 评论 -
B. Light It Up
题目链接:http://codeforces.com/problemset/problem/1000/B代码:#include<iostream>#include<cstring>#include<string>#include<iomanip>#include<cmath>#include<algorithm&...原创 2018-08-13 09:58:47 · 250 阅读 · 0 评论 -
B. ZgukistringZ
题目链接:http://codeforces.com/contest/551/problem/B题目大意:给你三个字符串,s1,s2,s3. s1任意两个字符串之间可以互相交换。问,在s1中s2和s3在不重叠的情况下,两个字符串出现的最多次数之和的时候为多少,然后将排完序的字符串输出。思路:一开始打算用桶排做,将每个字符串中的字符出现的次数记录下来,然后查看每个字符串在s1中出现的次...原创 2018-07-26 15:35:43 · 261 阅读 · 0 评论 -
F - Set of Strings
You are given a string q. A sequence of k strings s1, s2, ..., sk is called beautiful, if the concatenation of these strings is string q (formally, s1 + s2 + ... + sk = q) and the first characters ...原创 2018-07-15 15:11:22 · 197 阅读 · 0 评论 -
B. Bus of Characters
B. Bus of Characterstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the Bus of Characters there are nn rows of seat, each hav...原创 2018-05-21 23:42:29 · 392 阅读 · 0 评论 -
2018 5 12 B - Mahmoud and Ehab and the message
题目链接:https://cn.vjudge.net/contest/228833#problem/B题目的意思就是:首先给出一个字符串,下一行再给出每一个单词的权值,接下来几行是用来说明哪几个单词的权值可以相互找最小,最后一行给出一个字符串,然后判断最后一句话的所有单词的权值。思路:使用strl中的map操作,map的第一个位置用来存每一个字符串,第二个位置用来存每一个字符串的权值,这是...原创 2018-05-12 23:39:40 · 232 阅读 · 0 评论