B. Complete the Word time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists a substring (contiguous segmen…
题目链接:http://codeforces.com/problemset/problem/716/B 题目大意: 给出一个字符串,判断其是否存在一个子串(满足:包含26个英文字母且不重复,字串中有‘?’表示占位符可表示字母),如果存在则输出该字串‘?’位置用替换后的字母代替,其他不在子串中的‘?’用字母代替即可.如果该字串不存在满足条件的子串,则输出-1. 举例: ---------------------------------- input ABC??FGHIJK???OPQR?TUVWX…
Codeforces Round #372 (Div. 2) 不知不觉自己怎么变的这么水了,几百年前做A.B的水平,现在依旧停留在A.B水平.甚至B题还不会做.难道是带着一种功利性的态度患得患失?总共才打的几场 CF 节节掉分.学了快一年了成了个水货. 废话就不多说了,来看这次的这两题吧.很多CF的题是不想写博客的,如果题目质量很好的话我倒是愿意留在我的博客里: A. Crazy Computer time limit per test 2 seconds memory limit per te…
Codeforces Round #372 (Div. 2) C. Plus and Square Root 题意 一个游戏中,有一个数字\(x\),当前游戏等级为\(k\),有两种操作: '+'按钮:使得\(x=x+k\) '√'按钮:使得\(x=\sqrt{x}\),此时\(x\)必须是平方数,游戏等级加1,即\(k=k+1\),且\(\sqrt{x}\)是\(k+1\)的倍数. 游戏开始时,\(x=2,k=1\),输出\(n(n \le 10^5)\)个数,表示每个等级对应的\(\frac…
B. Complete the Word time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists a substring (contiguous segmen…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
B. Complete The Graph time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder has drawn an undirected graph of n vertices numbered from 0 to n - 1 and m edges between them. Each edge…
题目就是给你一个图,图中部分边没有赋权值,要求你把无权的边赋值,使得s->t的最短路为l. 卡了几周的题了,最后还是经群主大大指点……做出来的…… 思路就是跑最短路,然后改权值为最短路和L的差值,直到最短路为L,或者每条无权边都赋值为止. 点是0-n-1的,因为这个错了好几次= = dijkstra超时,spfa卡过. 看到很多题解说二分,但是实在不能理解那个思路阿………… #include <bits/stdc++.h> using namespace std; typedef lon…