CF1227C Messy】的更多相关文章

思路: 构造题.首先把字符串变成“(((((...)))))”的样子,再根据k的取值变成“()()()...((...))”的样子即可. 实现: #include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; while (T--) { int n, k; string s; cin >> n >> k >> s; vector<pair<int,…
题目链接:http://uoj.ac/problem/239 题目大意: 这是一道交互题,交互库维护了一个数据结构,可以存储n为二进制串,一开始你可以向空的数据结构中插入若干二进制串, 接下来这个数据结构会将其中存储的二进制串进行改变. 改变的方法是生成一个0到n-1的排列pi,将原来的二进制串a0a1a2..an-1变成ap0ap1..apn-1. 接着你可以进行询问,每次询问一个串是否在这个数据结构当中,要求你在不超过w次插入和r次询问中求出排列p 分析:读完题后看看数据范围,w=r=896…
      We always use Windows Server 2008 R2 English operation system. And it doesn't have any problem. But nowadays, we encounter a messy code problem in that operation system.       The problem occurred in a software reporting tools. What were worse,…
I use the Elicpse IDE to develope the ansdroid app.Sometime encounter the messy code in the Elicpse One solve method is that to fix the Ecicpse's enCoding setting: click "Windows->Preferences->General->Content Type",in the right tab,mak…
It's very strange that I found the messy code.I 've never seen this before. this is the java code: /** * list * * @throws UnsupportedEncodingException */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Long adminI…
C. Messy You are fed up with your messy room, so you decided to clean it up. Your room is a bracket sequence s=s1s2-sn of length n. Each character of this string is either an opening bracket '(' or a closing bracket ')'. In one operation you can choo…
Case:同样的代码,本地开发环境(local is Chinese Simplify)可以成功运行,但是放到Windows Server 2008 R2(Local is United State) 上,同样的代码失败了.最后跑到server上用vs2012 获取最新代码发现所有的中文都是乱码. Solution1:只该代码,其它设置不变(server 上的是设置不是我们这些小兵想动就可以动的).我写了两个方法. public bool CompareChineseString(string…
#include <cstdio> #define _(l) int l #define ___(l,L) for (_(o)=0,x=l o*2;o<x;o++)O= L o; #define __ _ ( _ ) const __=0x80000000; _(main)() { int T; scanf("%d",&T); while(T--){ _(O); scanf("%d",&O); if(O&_)___(-,-~…
apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy init 6…
//因为可以反转n次 所以可以得到任何可以构成的序列 #include<iostream> #include<string> #include<vector> using namespace std ; typedef pair<int,int>PII; int n,k; string s; string get_str(int n,int k) {//先构建前k-1个 string res=""; ; i<k-; i++) { r…