IOI2016Day2. Messy】的更多相关文章

题目链接: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&_)___(-,-~…
题目链接:http://uoj.ac/problem/238 题目大意: 有一个长度为n的黑白序列,告诉你所以k个极长连续黑段长度和顺序.有一些位置的颜色已知,需要判断剩下未知的位置哪些颜色 一定是白或一定是黑.保证至少存在一组解. 分析: 先猜测,根据数据范围,虽然n很大,但是k却很小,可以考虑复杂度为O(n*k)的算法.(* ̄︶ ̄) 我们再来具体看看,可以设状态: f0[i][j] 表示前i个位置能匹配j段并且i位置为白是否合法. f1[i][j] 表示前i个位置能匹配j段并且i位置为黑是否…
apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy init 6…
思路: 构造题.首先把字符串变成“(((((...)))))”的样子,再根据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,…