h*g
2 楼
Given a list of words, L, that are all the same length, and a string, S,
find the starting position of the substring of S that is a concatenation of
each word in L exactly once and without any intervening characters. This
substring will occur exactly once in S..
.
Example:.
L: "fooo", "barr", "wing", "ding", "wing".
S: "lingmindraboofooowingdingbarrwingmonkeypoundcake".
fooowingdingbarrwing.
trie的话,现场写程序不方便吧?
find the starting position of the substring of S that is a concatenation of
each word in L exactly once and without any intervening characters. This
substring will occur exactly once in S..
.
Example:.
L: "fooo", "barr", "wing", "ding", "wing".
S: "lingmindraboofooowingdingbarrwingmonkeypoundcake".
fooowingdingbarrwing.
trie的话,现场写程序不方便吧?
c*h
3 楼
想搞个7寸板自己玩安卓。。。
Nexus 7还是Nook HD?这屏幕比Nook HD如何?
Nexus 7还是Nook HD?这屏幕比Nook HD如何?
s*y
4 楼
在做一个皮肤病模型,腹腔注射Tamoxifen诱导K14-ERT2-cre表达。连续注射5天,每次
0.3mg。停止注射两周后开始实验,持续2周。
1. Tamoxifen半衰期只有48小时,和玉米油混合后不知道能延长多少。4周后是不是已
经完全代谢没了?
2. 皮肤的turnover比较快,是不是很快就修复了。
谢谢!
0.3mg。停止注射两周后开始实验,持续2周。
1. Tamoxifen半衰期只有48小时,和玉米油混合后不知道能延长多少。4周后是不是已
经完全代谢没了?
2. 皮肤的turnover比较快,是不是很快就修复了。
谢谢!
p*2
6 楼
trie的话写起来也还好。实现add, find两个函数应该就可以了。
这样就是N*L的复杂度了。
这样就是N*L的复杂度了。
F*y
9 楼
up
p*2
10 楼
写了一个练练手。
import java.util.*;
class Node
{
Node[] children=new Node[26];
public Node Set(char c)
{
Node node=new Node();
children[c-'a']=node;
return node;
}
public Node Get(char c)
{
return children[c-'a'];
}
}
class Trie
{
Node root=new Node();
public void Add(String word)
{
int i=0;
Node node=root;
while(i {
char c=word.charAt(i);
if(node.Get(c)==null)
node=node.Set(c);
else
node=node.Get(c);
i++;
}
}
public boolean Find(String word)
{
boolean ret=true;
int i=0;
Node node=root;
while(i {
char c=word.charAt(i);
if(node.Get(c)!=null)
node=node.Get(c);
else
{
ret=false;
break;
}
i++;
}
return ret;
}
}
public class Solution
{
static String[] L;
static int len;
static Trie trie=new Trie();
static HashMap hm=new HashMap();
public static boolean Check(String str)
{
HashMap ht=new HashMap();
for(int i=0;i {
String sub=str.substring(i*len,i*len+len);
if(trie.Find(sub))
{
if(ht.containsKey(sub))
ht.put(sub, ht.get(sub)+1);
else
ht.put(sub, 1);
}
else
return false;
}
if(hm.size()!=ht.size())
return false;
for(String s: hm.keySet())
{
if(hm.get(s)!=ht.get(s))
return false;
}
return true;
}
public static void main(String[] args)
{
L=new String[]{ "fooo", "barr", "wing", "ding", "wing"};
len=4;
for(String s:L)
{
trie.Add(s);
if(hm.containsKey(s))
hm.put(s, hm.get(s)+1);
else
hm.put(s, 1);
}
int totalLen=len*L.length;
String S="lingmindraboofooowingdingbarrwingmonkeypoundcake";
for(int i=0;i<=S.length()-totalLen;i++)
{
if(Check(S.substring(i,i+totalLen)))
{
System.out.println(S.substring(i,i+totalLen));
break;
}
}
}
}
import java.util.*;
class Node
{
Node[] children=new Node[26];
public Node Set(char c)
{
Node node=new Node();
children[c-'a']=node;
return node;
}
public Node Get(char c)
{
return children[c-'a'];
}
}
class Trie
{
Node root=new Node();
public void Add(String word)
{
int i=0;
Node node=root;
while(i
char c=word.charAt(i);
if(node.Get(c)==null)
node=node.Set(c);
else
node=node.Get(c);
i++;
}
}
public boolean Find(String word)
{
boolean ret=true;
int i=0;
Node node=root;
while(i
char c=word.charAt(i);
if(node.Get(c)!=null)
node=node.Get(c);
else
{
ret=false;
break;
}
i++;
}
return ret;
}
}
public class Solution
{
static String[] L;
static int len;
static Trie trie=new Trie();
static HashMap
public static boolean Check(String str)
{
HashMap
for(int i=0;i
String sub=str.substring(i*len,i*len+len);
if(trie.Find(sub))
{
if(ht.containsKey(sub))
ht.put(sub, ht.get(sub)+1);
else
ht.put(sub, 1);
}
else
return false;
}
if(hm.size()!=ht.size())
return false;
for(String s: hm.keySet())
{
if(hm.get(s)!=ht.get(s))
return false;
}
return true;
}
public static void main(String[] args)
{
L=new String[]{ "fooo", "barr", "wing", "ding", "wing"};
len=4;
for(String s:L)
{
trie.Add(s);
if(hm.containsKey(s))
hm.put(s, hm.get(s)+1);
else
hm.put(s, 1);
}
int totalLen=len*L.length;
String S="lingmindraboofooowingdingbarrwingmonkeypoundcake";
for(int i=0;i<=S.length()-totalLen;i++)
{
if(Check(S.substring(i,i+totalLen)))
{
System.out.println(S.substring(i,i+totalLen));
break;
}
}
}
}
a*m
11 楼
不折腾的话n7还不错。1280*800比1440x900低点,最好自己去商店看看再说。
c*h
14 楼
那还是等Nook HD下一波deal吧。
我眼睛要求比较高,看文字比较多。。。。
ipad mini那种是绝对不能忍受的。
【在 p*******m 的大作中提到】
: http://www.mitbbs.com/article_t/PDA/32037579.html
我眼睛要求比较高,看文字比较多。。。。
ipad mini那种是绝对不能忍受的。
【在 p*******m 的大作中提到】
: http://www.mitbbs.com/article_t/PDA/32037579.html
s*y
15 楼
诱导后多久又成为wt野生型了?实验要在几天内完成?
有的模型周期长,难道中间还要再注射几次?
有的模型周期长,难道中间还要再注射几次?
s*y
18 楼
找到一篇
(1) administration of high Tm doses leads to extended CreER nuclear
localization; (2) Tm administration induces reporter gene recombination for
several days or weeks after Tm treatment is completed, depending on the
original dose administered; and (3) Tm treatment induces side effects that
may have physiologic consequences in Tm-inducible models.
: 诱导后多久又成为wt野生型了?实验要在几天内完成?
: 有的模型周期长,难道中间还要再注射几次?
【在 s*********y 的大作中提到】
: 诱导后多久又成为wt野生型了?实验要在几天内完成?
: 有的模型周期长,难道中间还要再注射几次?
(1) administration of high Tm doses leads to extended CreER nuclear
localization; (2) Tm administration induces reporter gene recombination for
several days or weeks after Tm treatment is completed, depending on the
original dose administered; and (3) Tm treatment induces side effects that
may have physiologic consequences in Tm-inducible models.
: 诱导后多久又成为wt野生型了?实验要在几天内完成?
: 有的模型周期长,难道中间还要再注射几次?
【在 s*********y 的大作中提到】
: 诱导后多久又成为wt野生型了?实验要在几天内完成?
: 有的模型周期长,难道中间还要再注射几次?
t*p
21 楼
K14是表达在基底细胞,也即通常说的皮肤干细胞,一旦发生敲除就永久敲除,皮肤干
细胞理论上不会丢失,所以不存在4周以后就没有了的问题。
K14-CreERT2的效率不是很高,假设你诱导敲除一半的细胞,那么另一半的细胞足以掩
盖敲除细胞的缺陷。除非你的基因特别强大。我觉的K14-CreERT2作为tracing的工具鼠
就好,要用它研究基因在成体小鼠中的功能并不是很好用,主要就是诱导效率还不够高。
【在 s*********y 的大作中提到】
: 在做一个皮肤病模型,腹腔注射Tamoxifen诱导K14-ERT2-cre表达。连续注射5天,每次
: 0.3mg。停止注射两周后开始实验,持续2周。
: 1. Tamoxifen半衰期只有48小时,和玉米油混合后不知道能延长多少。4周后是不是已
: 经完全代谢没了?
: 2. 皮肤的turnover比较快,是不是很快就修复了。
: 谢谢!
细胞理论上不会丢失,所以不存在4周以后就没有了的问题。
K14-CreERT2的效率不是很高,假设你诱导敲除一半的细胞,那么另一半的细胞足以掩
盖敲除细胞的缺陷。除非你的基因特别强大。我觉的K14-CreERT2作为tracing的工具鼠
就好,要用它研究基因在成体小鼠中的功能并不是很好用,主要就是诱导效率还不够高。
【在 s*********y 的大作中提到】
: 在做一个皮肤病模型,腹腔注射Tamoxifen诱导K14-ERT2-cre表达。连续注射5天,每次
: 0.3mg。停止注射两周后开始实验,持续2周。
: 1. Tamoxifen半衰期只有48小时,和玉米油混合后不知道能延长多少。4周后是不是已
: 经完全代谢没了?
: 2. 皮肤的turnover比较快,是不是很快就修复了。
: 谢谢!
s*y
24 楼
K14是表达在基底细胞,也即通常说的皮肤干细胞,一旦发生敲除就永久敲除,皮肤干
细胞理论上不会丢失,所以不存在4周以后就没有了的问题。
请问 toptip 这个有文献支持吗?
细胞理论上不会丢失,所以不存在4周以后就没有了的问题。
请问 toptip 这个有文献支持吗?
a*n
28 楼
直接用HASHMAP/RABIN-KARP测试就行了吧,,,加上长度都是4就更简单了。。。每次
产生4个字符的字符串到HASH-MAP里面匹配。全找到就结束,没找到就继续。。
产生4个字符的字符串到HASH-MAP里面匹配。全找到就结束,没找到就继续。。
b*z
29 楼
both garbage
s*y
30 楼
我用的就是fuchs的小鼠。在她1999年的PNAS里写道
This promoter is strongly active in dividing cells of epidermis and some
other stratified squamous epithelia。
Finally, we show that epidermal cells harboring a Cre-dependent rearranged
genome persist for many months after tamoxifen application, indicating that
the epidermal stem cell population has been targeted efficiently.
但是法国的Chambon Lab认为只能维持几天的时间
Curr Protoc Mouse Biol. 2011 Mar 1;1(1):55-70. doi: 10.1002/9780470942390.
mo100128.
Generation of Spatio-Temporally Controlled Targeted Somatic Mutations in the
Mouse.
Metzger D1, Chambon P1.
This promoter is strongly active in dividing cells of epidermis and some
other stratified squamous epithelia。
Finally, we show that epidermal cells harboring a Cre-dependent rearranged
genome persist for many months after tamoxifen application, indicating that
the epidermal stem cell population has been targeted efficiently.
但是法国的Chambon Lab认为只能维持几天的时间
Curr Protoc Mouse Biol. 2011 Mar 1;1(1):55-70. doi: 10.1002/9780470942390.
mo100128.
Generation of Spatio-Temporally Controlled Targeted Somatic Mutations in the
Mouse.
Metzger D1, Chambon P1.
q*c
31 楼
Isn't it similar to strstr? Is it a phone or onsite question?
S*e
33 楼
that
the
fuchs是美国的一座大山,想在这行混的美国实验室基本上不甘指出来她的漏洞,我倾
向于法国实验室的结论。不过你还是多看看这方面的文章,或者自己做看看。这个不在
于你ko什么基因,基本上是干细胞marker是不是k15的争议。好像另外一个ru486诱导的
也很多人用。
【在 s*********y 的大作中提到】
: 我用的就是fuchs的小鼠。在她1999年的PNAS里写道
: This promoter is strongly active in dividing cells of epidermis and some
: other stratified squamous epithelia。
: Finally, we show that epidermal cells harboring a Cre-dependent rearranged
: genome persist for many months after tamoxifen application, indicating that
: the epidermal stem cell population has been targeted efficiently.
: 但是法国的Chambon Lab认为只能维持几天的时间
: Curr Protoc Mouse Biol. 2011 Mar 1;1(1):55-70. doi: 10.1002/9780470942390.
: mo100128.
: Generation of Spatio-Temporally Controlled Targeted Somatic Mutations in the
a*g
34 楼
c++ practice (use multiset):
#include
#include
using std::multiset;
using std::string;
int len_p = 4;
bool check_substr(string s, const multiset &L) {
multiset dup_L = L;
for (unsigned i=0; i string token = s.substr(i, len_p);
multiset::iterator itor = dup_L.find(token);
if (itor == dup_L.end()) {
return false;
}
dup_L.erase(itor);
}
return dup_L.empty();
}
int main(int argc, char* argv[])
{
multiset L;
L.insert("fooo");
L.insert("barr");
L.insert("wing");
L.insert("ding");
L.insert("wing");
const string S = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int size_L = L.size();
int len_substr = len_p * size_L;
for (unsigned i=0; i < S.length() - len_substr; i++) {
if (check_substr(S.substr(i, len_substr), L)) {
printf("found. pos:%d\n", i);
return 0;
}
}
printf("not found.\n");
return 0;
}
It's not trivial to me how to apply RK algorithm to this problem but I guess
defining a hash function using histogram of characters might work.
#include
#include
using std::multiset;
using std::string;
int len_p = 4;
bool check_substr(string s, const multiset
multiset
for (unsigned i=0; i
multiset
if (itor == dup_L.end()) {
return false;
}
dup_L.erase(itor);
}
return dup_L.empty();
}
int main(int argc, char* argv[])
{
multiset
L.insert("fooo");
L.insert("barr");
L.insert("wing");
L.insert("ding");
L.insert("wing");
const string S = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int size_L = L.size();
int len_substr = len_p * size_L;
for (unsigned i=0; i < S.length() - len_substr; i++) {
if (check_substr(S.substr(i, len_substr), L)) {
printf("found. pos:%d\n", i);
return 0;
}
}
printf("not found.\n");
return 0;
}
It's not trivial to me how to apply RK algorithm to this problem but I guess
defining a hash function using histogram of characters might work.
h*9
39 楼
本人在做骨骼肌基因诱导敲出。Tam 灌胃和腹腔注射哪种方式更有效?似乎灌胃剂量可
以给更大一些(4mg per time)
以给更大一些(4mg per time)
j*b
42 楼
没想到什么特别巧的办法,brute force + hashmap?
public static void main(String[] args) {
String l[] = { "fooo", "barr", "wing", "ding", "wing" };
Map map = new HashMap();
for (int i = 0; i < l.length; i++){
if(map.containsKey(l[i]))
map.put(l[i], map.get(l[i]) +1);
else
map.put(l[i], 1);
}
String s = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int len = l[0].length();
for (int j = 0; j < len; j++) {
Map map2 = new HashMap();
for (int i = j; i <= s.length() - len; i+=len) {
String ss = s.substring(i, i + len);
if (map.containsKey(ss)) {
if(!map2.containsKey(ss) || map2.get(ss) < map.get(ss)){
if(map2.containsKey(ss))
map2.put(ss, map2.get(ss)+1);
else
map2.put(ss, 1);
if(map2.entrySet().equals(map.entrySet())){
String r =s.substring(i+len-l.length*len,i+len);
System.out.println(r);
return;
}
}else{
map2.clear();
}
}else{
map2.clear();
}
}
}
}
public static void main(String[] args) {
String l[] = { "fooo", "barr", "wing", "ding", "wing" };
Map
for (int i = 0; i < l.length; i++){
if(map.containsKey(l[i]))
map.put(l[i], map.get(l[i]) +1);
else
map.put(l[i], 1);
}
String s = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int len = l[0].length();
for (int j = 0; j < len; j++) {
Map
for (int i = j; i <= s.length() - len; i+=len) {
String ss = s.substring(i, i + len);
if (map.containsKey(ss)) {
if(!map2.containsKey(ss) || map2.get(ss) < map.get(ss)){
if(map2.containsKey(ss))
map2.put(ss, map2.get(ss)+1);
else
map2.put(ss, 1);
if(map2.entrySet().equals(map.entrySet())){
String r =s.substring(i+len-l.length*len,i+len);
System.out.println(r);
return;
}
}else{
map2.clear();
}
}else{
map2.clear();
}
}
}
}
h*w
44 楼
mark
s*e
46 楼
用HASHMAP 找出每个WORD 所在的位置 occurrence map,在做一个反向的由所在位置(
position)到WORD 的reverse occurrence map。 吧这些position 排序,然后递归搜索。
package smartnose;
import java.util.Arrays;
import java.util.*;
public class SubWordSeq {
public static void main(String [] args){
List L = new LinkedList();
L.add("fooo");L.add("barr");L.add("wing");L.add("ding");L.add("wing"
);
String S= "lingmindraboofooowingdingbarrwingmonkeypoundcake";
HashMap> occurMap = new HashMap Integer>>();
for(String word:L){
occurMap.put(word, new ArrayList());
}
int wordLen = L.get(0).length();
for(int i=0;i+wordLen String sub = S.subSequence(i, i+wordLen).toString();
if(occurMap.containsKey(sub))//add the occurrance
occurMap.get(sub).add(i);
}
HashMap> rOccurMap = new HashMap>();
for(String w: occurMap.keySet()){
List occ = occurMap.get(w);
for(Integer pos: occ){
if(rOccurMap.containsKey(pos)){
rOccurMap.get(pos).add(w);
}
else{
rOccurMap.put(pos, Arrays.asList(w));
}
}
}
List distinctPos = new ArrayList();
distinctPos.addAll(rOccurMap.keySet());
Collections.sort(distinctPos);
//now search the f*ck out of it.
for(Integer start:distinctPos)
if(recurSearch(L,rOccurMap,start,wordLen)){
System.out.println("found one instance starting at:"+start);
break;
}
}
public static boolean recurSearch(List L, HashMap String>> rMap, int curPos, int wLen){
if(L.isEmpty())
return true;
List cWords = rMap.get(curPos);
for(String w: cWords){
if(L.contains(w)){
//L.remove(w);
int idx=L.indexOf(w);
L.remove(idx);//can be more efficient
if(recurSearch(L, rMap, curPos+wLen, wLen))
return true;
L.add(w);
}
}
return false;
}
}
position)到WORD 的reverse occurrence map。 吧这些position 排序,然后递归搜索。
package smartnose;
import java.util.Arrays;
import java.util.*;
public class SubWordSeq {
public static void main(String [] args){
List
L.add("fooo");L.add("barr");L.add("wing");L.add("ding");L.add("wing"
);
String S= "lingmindraboofooowingdingbarrwingmonkeypoundcake";
HashMap
for(String word:L){
occurMap.put(word, new ArrayList
}
int wordLen = L.get(0).length();
for(int i=0;i+wordLen
if(occurMap.containsKey(sub))//add the occurrance
occurMap.get(sub).add(i);
}
HashMap
for(String w: occurMap.keySet()){
List
for(Integer pos: occ){
if(rOccurMap.containsKey(pos)){
rOccurMap.get(pos).add(w);
}
else{
rOccurMap.put(pos, Arrays.asList(w));
}
}
}
List
distinctPos.addAll(rOccurMap.keySet());
Collections.sort(distinctPos);
//now search the f*ck out of it.
for(Integer start:distinctPos)
if(recurSearch(L,rOccurMap,start,wordLen)){
System.out.println("found one instance starting at:"+start);
break;
}
}
public static boolean recurSearch(List
if(L.isEmpty())
return true;
List
for(String w: cWords){
if(L.contains(w)){
//L.remove(w);
int idx=L.indexOf(w);
L.remove(idx);//can be more efficient
if(recurSearch(L, rMap, curPos+wLen, wLen))
return true;
L.add(w);
}
}
return false;
}
}
a*s
48 楼
mark
l*e
50 楼
mark
h*e
51 楼
如果你看文字比较多,那我觉得你可能还是等等吧
去店里看看16:9的屏幕能否接受,反正我是不能
我觉得呢阅读就用eink好了
平板用你现在的nook hd+就行了,
如果4:3只有坑爹的iPad Mini的话至少等等看有没有3:2的安卓吧。
去店里看看16:9的屏幕能否接受,反正我是不能
我觉得呢阅读就用eink好了
平板用你现在的nook hd+就行了,
如果4:3只有坑爹的iPad Mini的话至少等等看有没有3:2的安卓吧。
k*y
54 楼
Python写了一个,练练手
L = ['fooo', 'barr', 'wing', 'ding', 'wing']
S = 'lingmindraboofooowingdingbarrwingmonkeypoundcake'
# L1 stores distinct stings in L
# multiples counts the corresponding multiples
L1 = []
multiples = []
for str in L:
if str not in L1:
L1.append(str)
multiples.append(L.count(str))
# k is the lenght of each substring
k = len(L[0])
match = [0]*len(S)
checklist = []
for i in range(0, len(L1)):
mul = multiples[i]
list_pos = []
# find all possible positions matching L1[i]
pos = 0; pos = S.find(L1[i], pos, len(S))
while pos != -1:
list_pos.append(pos)
pos = S.find(L1[i], pos+1, len(S))
for j in range(0, len(list_pos)):
# only count those without too many occurrence
if (j+mul >= len(list_pos)
or list_pos[j] + k*len(L) < list_pos[j+mul]):
match[list_pos[j]] = 1
checklist.append(list_pos[j])
for i in range(0, len(checklist)):
pos = checklist[i]
j = 0
while j < len(L):
if match[pos+j*k] == 0:
break
j += 1
if j == len(L):
print S[checklist[i]:checklist[i]+k*len(L)]
break
L = ['fooo', 'barr', 'wing', 'ding', 'wing']
S = 'lingmindraboofooowingdingbarrwingmonkeypoundcake'
# L1 stores distinct stings in L
# multiples counts the corresponding multiples
L1 = []
multiples = []
for str in L:
if str not in L1:
L1.append(str)
multiples.append(L.count(str))
# k is the lenght of each substring
k = len(L[0])
match = [0]*len(S)
checklist = []
for i in range(0, len(L1)):
mul = multiples[i]
list_pos = []
# find all possible positions matching L1[i]
pos = 0; pos = S.find(L1[i], pos, len(S))
while pos != -1:
list_pos.append(pos)
pos = S.find(L1[i], pos+1, len(S))
for j in range(0, len(list_pos)):
# only count those without too many occurrence
if (j+mul >= len(list_pos)
or list_pos[j] + k*len(L) < list_pos[j+mul]):
match[list_pos[j]] = 1
checklist.append(list_pos[j])
for i in range(0, len(checklist)):
pos = checklist[i]
j = 0
while j < len(L):
if match[pos+j*k] == 0:
break
j += 1
if j == len(L):
print S[checklist[i]:checklist[i]+k*len(L)]
break
h*g
56 楼
Given a list of words, L, that are all the same length, and a string, S,
find the starting position of the substring of S that is a concatenation of
each word in L exactly once and without any intervening characters. This
substring will occur exactly once in S..
.
Example:.
L: "fooo", "barr", "wing", "ding", "wing".
S: "lingmindraboofooowingdingbarrwingmonkeypoundcake".
fooowingdingbarrwing.
trie的话,现场写程序不方便吧?
find the starting position of the substring of S that is a concatenation of
each word in L exactly once and without any intervening characters. This
substring will occur exactly once in S..
.
Example:.
L: "fooo", "barr", "wing", "ding", "wing".
S: "lingmindraboofooowingdingbarrwingmonkeypoundcake".
fooowingdingbarrwing.
trie的话,现场写程序不方便吧?
p*2
58 楼
trie的话写起来也还好。实现add, find两个函数应该就可以了。
这样就是N*L的复杂度了。
这样就是N*L的复杂度了。
p*2
60 楼
写了一个练练手。
import java.util.*;
class Node
{
Node[] children=new Node[26];
public Node Set(char c)
{
Node node=new Node();
children[c-'a']=node;
return node;
}
public Node Get(char c)
{
return children[c-'a'];
}
}
class Trie
{
Node root=new Node();
public void Add(String word)
{
int i=0;
Node node=root;
while(i {
char c=word.charAt(i);
if(node.Get(c)==null)
node=node.Set(c);
else
node=node.Get(c);
i++;
}
}
public boolean Find(String word)
{
boolean ret=true;
int i=0;
Node node=root;
while(i {
char c=word.charAt(i);
if(node.Get(c)!=null)
node=node.Get(c);
else
{
ret=false;
break;
}
i++;
}
return ret;
}
}
public class Solution
{
static String[] L;
static int len;
static Trie trie=new Trie();
static HashMap hm=new HashMap();
public static boolean Check(String str)
{
HashMap ht=new HashMap();
for(int i=0;i {
String sub=str.substring(i*len,i*len+len);
if(trie.Find(sub))
{
if(ht.containsKey(sub))
ht.put(sub, ht.get(sub)+1);
else
ht.put(sub, 1);
}
else
return false;
}
if(hm.size()!=ht.size())
return false;
for(String s: hm.keySet())
{
if(hm.get(s)!=ht.get(s))
return false;
}
return true;
}
public static void main(String[] args)
{
L=new String[]{ "fooo", "barr", "wing", "ding", "wing"};
len=4;
for(String s:L)
{
trie.Add(s);
if(hm.containsKey(s))
hm.put(s, hm.get(s)+1);
else
hm.put(s, 1);
}
int totalLen=len*L.length;
String S="lingmindraboofooowingdingbarrwingmonkeypoundcake";
for(int i=0;i<=S.length()-totalLen;i++)
{
if(Check(S.substring(i,i+totalLen)))
{
System.out.println(S.substring(i,i+totalLen));
break;
}
}
}
}
import java.util.*;
class Node
{
Node[] children=new Node[26];
public Node Set(char c)
{
Node node=new Node();
children[c-'a']=node;
return node;
}
public Node Get(char c)
{
return children[c-'a'];
}
}
class Trie
{
Node root=new Node();
public void Add(String word)
{
int i=0;
Node node=root;
while(i
char c=word.charAt(i);
if(node.Get(c)==null)
node=node.Set(c);
else
node=node.Get(c);
i++;
}
}
public boolean Find(String word)
{
boolean ret=true;
int i=0;
Node node=root;
while(i
char c=word.charAt(i);
if(node.Get(c)!=null)
node=node.Get(c);
else
{
ret=false;
break;
}
i++;
}
return ret;
}
}
public class Solution
{
static String[] L;
static int len;
static Trie trie=new Trie();
static HashMap
public static boolean Check(String str)
{
HashMap
for(int i=0;i
String sub=str.substring(i*len,i*len+len);
if(trie.Find(sub))
{
if(ht.containsKey(sub))
ht.put(sub, ht.get(sub)+1);
else
ht.put(sub, 1);
}
else
return false;
}
if(hm.size()!=ht.size())
return false;
for(String s: hm.keySet())
{
if(hm.get(s)!=ht.get(s))
return false;
}
return true;
}
public static void main(String[] args)
{
L=new String[]{ "fooo", "barr", "wing", "ding", "wing"};
len=4;
for(String s:L)
{
trie.Add(s);
if(hm.containsKey(s))
hm.put(s, hm.get(s)+1);
else
hm.put(s, 1);
}
int totalLen=len*L.length;
String S="lingmindraboofooowingdingbarrwingmonkeypoundcake";
for(int i=0;i<=S.length()-totalLen;i++)
{
if(Check(S.substring(i,i+totalLen)))
{
System.out.println(S.substring(i,i+totalLen));
break;
}
}
}
}
c*y
65 楼
我想找一个随身带的7寸,找了好几个月了,最后买了ipad mini。
n7的问题是带鱼屏。分辨率是不差,不过我猜,用过高分之后,
这个分辨率也不能入眼。
既然各方面都很平庸,那我就选mini吧,它毕竟有两个第一,
外观第一好,屏幕第一差
n7的问题是带鱼屏。分辨率是不差,不过我猜,用过高分之后,
这个分辨率也不能入眼。
既然各方面都很平庸,那我就选mini吧,它毕竟有两个第一,
外观第一好,屏幕第一差
a*n
72 楼
直接用HASHMAP/RABIN-KARP测试就行了吧,,,加上长度都是4就更简单了。。。每次
产生4个字符的字符串到HASH-MAP里面匹配。全找到就结束,没找到就继续。。
产生4个字符的字符串到HASH-MAP里面匹配。全找到就结束,没找到就继续。。
q*c
74 楼
Isn't it similar to strstr? Is it a phone or onsite question?
a*g
76 楼
c++ practice (use multiset):
#include
#include
using std::multiset;
using std::string;
int len_p = 4;
bool check_substr(string s, const multiset &L) {
multiset dup_L = L;
for (unsigned i=0; i string token = s.substr(i, len_p);
multiset::iterator itor = dup_L.find(token);
if (itor == dup_L.end()) {
return false;
}
dup_L.erase(itor);
}
return dup_L.empty();
}
int main(int argc, char* argv[])
{
multiset L;
L.insert("fooo");
L.insert("barr");
L.insert("wing");
L.insert("ding");
L.insert("wing");
const string S = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int size_L = L.size();
int len_substr = len_p * size_L;
for (unsigned i=0; i < S.length() - len_substr; i++) {
if (check_substr(S.substr(i, len_substr), L)) {
printf("found. pos:%d\n", i);
return 0;
}
}
printf("not found.\n");
return 0;
}
It's not trivial to me how to apply RK algorithm to this problem but I guess
defining a hash function using histogram of characters might work.
#include
#include
using std::multiset;
using std::string;
int len_p = 4;
bool check_substr(string s, const multiset
multiset
for (unsigned i=0; i
multiset
if (itor == dup_L.end()) {
return false;
}
dup_L.erase(itor);
}
return dup_L.empty();
}
int main(int argc, char* argv[])
{
multiset
L.insert("fooo");
L.insert("barr");
L.insert("wing");
L.insert("ding");
L.insert("wing");
const string S = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int size_L = L.size();
int len_substr = len_p * size_L;
for (unsigned i=0; i < S.length() - len_substr; i++) {
if (check_substr(S.substr(i, len_substr), L)) {
printf("found. pos:%d\n", i);
return 0;
}
}
printf("not found.\n");
return 0;
}
It's not trivial to me how to apply RK algorithm to this problem but I guess
defining a hash function using histogram of characters might work.
j*b
82 楼
没想到什么特别巧的办法,brute force + hashmap?
public static void main(String[] args) {
String l[] = { "fooo", "barr", "wing", "ding", "wing" };
Map map = new HashMap();
for (int i = 0; i < l.length; i++){
if(map.containsKey(l[i]))
map.put(l[i], map.get(l[i]) +1);
else
map.put(l[i], 1);
}
String s = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int len = l[0].length();
for (int j = 0; j < len; j++) {
Map map2 = new HashMap();
for (int i = j; i <= s.length() - len; i+=len) {
String ss = s.substring(i, i + len);
if (map.containsKey(ss)) {
if(!map2.containsKey(ss) || map2.get(ss) < map.get(ss)){
if(map2.containsKey(ss))
map2.put(ss, map2.get(ss)+1);
else
map2.put(ss, 1);
if(map2.entrySet().equals(map.entrySet())){
String r =s.substring(i+len-l.length*len,i+len);
System.out.println(r);
return;
}
}else{
map2.clear();
}
}else{
map2.clear();
}
}
}
}
public static void main(String[] args) {
String l[] = { "fooo", "barr", "wing", "ding", "wing" };
Map
for (int i = 0; i < l.length; i++){
if(map.containsKey(l[i]))
map.put(l[i], map.get(l[i]) +1);
else
map.put(l[i], 1);
}
String s = "lingmindraboofooowingdingbarrwingmonkeypoundcake";
int len = l[0].length();
for (int j = 0; j < len; j++) {
Map
for (int i = j; i <= s.length() - len; i+=len) {
String ss = s.substring(i, i + len);
if (map.containsKey(ss)) {
if(!map2.containsKey(ss) || map2.get(ss) < map.get(ss)){
if(map2.containsKey(ss))
map2.put(ss, map2.get(ss)+1);
else
map2.put(ss, 1);
if(map2.entrySet().equals(map.entrySet())){
String r =s.substring(i+len-l.length*len,i+len);
System.out.println(r);
return;
}
}else{
map2.clear();
}
}else{
map2.clear();
}
}
}
}
h*w
84 楼
mark
d*0
85 楼
看惯了HD+,看N7不太行
s*e
86 楼
用HASHMAP 找出每个WORD 所在的位置 occurrence map,在做一个反向的由所在位置(
position)到WORD 的reverse occurrence map。 吧这些position 排序,然后递归搜索。
package smartnose;
import java.util.Arrays;
import java.util.*;
public class SubWordSeq {
public static void main(String [] args){
List L = new LinkedList();
L.add("fooo");L.add("barr");L.add("wing");L.add("ding");L.add("wing"
);
String S= "lingmindraboofooowingdingbarrwingmonkeypoundcake";
HashMap> occurMap = new HashMap Integer>>();
for(String word:L){
occurMap.put(word, new ArrayList());
}
int wordLen = L.get(0).length();
for(int i=0;i+wordLen String sub = S.subSequence(i, i+wordLen).toString();
if(occurMap.containsKey(sub))//add the occurrance
occurMap.get(sub).add(i);
}
HashMap> rOccurMap = new HashMap>();
for(String w: occurMap.keySet()){
List occ = occurMap.get(w);
for(Integer pos: occ){
if(rOccurMap.containsKey(pos)){
rOccurMap.get(pos).add(w);
}
else{
rOccurMap.put(pos, Arrays.asList(w));
}
}
}
List distinctPos = new ArrayList();
distinctPos.addAll(rOccurMap.keySet());
Collections.sort(distinctPos);
//now search the f*ck out of it.
for(Integer start:distinctPos)
if(recurSearch(L,rOccurMap,start,wordLen)){
System.out.println("found one instance starting at:"+start);
break;
}
}
public static boolean recurSearch(List L, HashMap String>> rMap, int curPos, int wLen){
if(L.isEmpty())
return true;
List cWords = rMap.get(curPos);
for(String w: cWords){
if(L.contains(w)){
//L.remove(w);
int idx=L.indexOf(w);
L.remove(idx);//can be more efficient
if(recurSearch(L, rMap, curPos+wLen, wLen))
return true;
L.add(w);
}
}
return false;
}
}
position)到WORD 的reverse occurrence map。 吧这些position 排序,然后递归搜索。
package smartnose;
import java.util.Arrays;
import java.util.*;
public class SubWordSeq {
public static void main(String [] args){
List
L.add("fooo");L.add("barr");L.add("wing");L.add("ding");L.add("wing"
);
String S= "lingmindraboofooowingdingbarrwingmonkeypoundcake";
HashMap
for(String word:L){
occurMap.put(word, new ArrayList
}
int wordLen = L.get(0).length();
for(int i=0;i+wordLen
if(occurMap.containsKey(sub))//add the occurrance
occurMap.get(sub).add(i);
}
HashMap
for(String w: occurMap.keySet()){
List
for(Integer pos: occ){
if(rOccurMap.containsKey(pos)){
rOccurMap.get(pos).add(w);
}
else{
rOccurMap.put(pos, Arrays.asList(w));
}
}
}
List
distinctPos.addAll(rOccurMap.keySet());
Collections.sort(distinctPos);
//now search the f*ck out of it.
for(Integer start:distinctPos)
if(recurSearch(L,rOccurMap,start,wordLen)){
System.out.println("found one instance starting at:"+start);
break;
}
}
public static boolean recurSearch(List
if(L.isEmpty())
return true;
List
for(String w: cWords){
if(L.contains(w)){
//L.remove(w);
int idx=L.indexOf(w);
L.remove(idx);//can be more efficient
if(recurSearch(L, rMap, curPos+wLen, wLen))
return true;
L.add(w);
}
}
return false;
}
}
a*s
87 楼
mark
l*e
88 楼
mark
k*y
90 楼
Python写了一个,练练手
L = ['fooo', 'barr', 'wing', 'ding', 'wing']
S = 'lingmindraboofooowingdingbarrwingmonkeypoundcake'
# L1 stores distinct stings in L
# multiples counts the corresponding multiples
L1 = []
multiples = []
for str in L:
if str not in L1:
L1.append(str)
multiples.append(L.count(str))
# k is the lenght of each substring
k = len(L[0])
match = [0]*len(S)
checklist = []
for i in range(0, len(L1)):
mul = multiples[i]
list_pos = []
# find all possible positions matching L1[i]
pos = 0; pos = S.find(L1[i], pos, len(S))
while pos != -1:
list_pos.append(pos)
pos = S.find(L1[i], pos+1, len(S))
for j in range(0, len(list_pos)):
# only count those without too many occurrence
if (j+mul >= len(list_pos)
or list_pos[j] + k*len(L) < list_pos[j+mul]):
match[list_pos[j]] = 1
checklist.append(list_pos[j])
for i in range(0, len(checklist)):
pos = checklist[i]
j = 0
while j < len(L):
if match[pos+j*k] == 0:
break
j += 1
if j == len(L):
print S[checklist[i]:checklist[i]+k*len(L)]
break
L = ['fooo', 'barr', 'wing', 'ding', 'wing']
S = 'lingmindraboofooowingdingbarrwingmonkeypoundcake'
# L1 stores distinct stings in L
# multiples counts the corresponding multiples
L1 = []
multiples = []
for str in L:
if str not in L1:
L1.append(str)
multiples.append(L.count(str))
# k is the lenght of each substring
k = len(L[0])
match = [0]*len(S)
checklist = []
for i in range(0, len(L1)):
mul = multiples[i]
list_pos = []
# find all possible positions matching L1[i]
pos = 0; pos = S.find(L1[i], pos, len(S))
while pos != -1:
list_pos.append(pos)
pos = S.find(L1[i], pos+1, len(S))
for j in range(0, len(list_pos)):
# only count those without too many occurrence
if (j+mul >= len(list_pos)
or list_pos[j] + k*len(L) < list_pos[j+mul]):
match[list_pos[j]] = 1
checklist.append(list_pos[j])
for i in range(0, len(checklist)):
pos = checklist[i]
j = 0
while j < len(L):
if match[pos+j*k] == 0:
break
j += 1
if j == len(L):
print S[checklist[i]:checklist[i]+k*len(L)]
break
s*f
91 楼
//码遍本版
//inside for LOOP:
//1st round: check (ling)(mind)(rabo)(ofooowingdingbarrwingmonkeypoundcake
//2nd round: check l(ingm)(indr)(aboo)(fooowingdingbarrwingmonkeypoundcake
//...
//this can avoid double check, and, O(n) time, for slice window
string SubStrWordsGreat(const char *str, const vector &vs){
map ms;
int len = strlen(str);
const char *end = str + len;
int lensub = 0;
if (vs.size() == 0)
return "";
int sz = vs[0].size();
for (vector::const_iterator it = vs.begin(); it != vs.end(); ++
it){
++ms[*it];
lensub += it->size();
}
for (int i = 0; i < sz; ++i){
const char *left = str + i;
const char *right = left;
int count = 0;
while (end - left >= lensub){
string s = string(right, right + sz);
if (ms.find(s) == ms.end()){
//recover map
for (; left < right; left += sz){
string ss = string(left, left + sz);
++ms[ss];
--count;
}
left += sz;
right = left;
} else if (ms[s] == 0){
for (; left < right; left += sz){
string ss = string(left, left + sz);
if (ss == s){
left += sz;
break;
} else {
++ms[ss];
--count;
}
}
} else {
--ms[s];
if (++count == vs.size()){
return string(left, right + sz);
}
right += sz;
}
}
}
return "";
}
void TestSubStrWords(){
vector vs;
vs.push_back("fooo");
vs.push_back("barr");
vs.push_back("wing");
vs.push_back("ding");
vs.push_back("wing");
string a = SubStrWordsGreat("
lingmindraboofooowingdingbarrwingmonkeypoundcake", vs);
}
of
【在 h*****g 的大作中提到】
: Given a list of words, L, that are all the same length, and a string, S,
: find the starting position of the substring of S that is a concatenation of
: each word in L exactly once and without any intervening characters. This
: substring will occur exactly once in S..
: .
: Example:.
: L: "fooo", "barr", "wing", "ding", "wing".
: S: "lingmindraboofooowingdingbarrwingmonkeypoundcake".
: fooowingdingbarrwing.
: trie的话,现场写程序不方便吧?
//inside for LOOP:
//1st round: check (ling)(mind)(rabo)(ofooowingdingbarrwingmonkeypoundcake
//2nd round: check l(ingm)(indr)(aboo)(fooowingdingbarrwingmonkeypoundcake
//...
//this can avoid double check, and, O(n) time, for slice window
string SubStrWordsGreat(const char *str, const vector
map
int len = strlen(str);
const char *end = str + len;
int lensub = 0;
if (vs.size() == 0)
return "";
int sz = vs[0].size();
for (vector
it){
++ms[*it];
lensub += it->size();
}
for (int i = 0; i < sz; ++i){
const char *left = str + i;
const char *right = left;
int count = 0;
while (end - left >= lensub){
string s = string(right, right + sz);
if (ms.find(s) == ms.end()){
//recover map
for (; left < right; left += sz){
string ss = string(left, left + sz);
++ms[ss];
--count;
}
left += sz;
right = left;
} else if (ms[s] == 0){
for (; left < right; left += sz){
string ss = string(left, left + sz);
if (ss == s){
left += sz;
break;
} else {
++ms[ss];
--count;
}
}
} else {
--ms[s];
if (++count == vs.size()){
return string(left, right + sz);
}
right += sz;
}
}
}
return "";
}
void TestSubStrWords(){
vector
vs.push_back("fooo");
vs.push_back("barr");
vs.push_back("wing");
vs.push_back("ding");
vs.push_back("wing");
string a = SubStrWordsGreat("
lingmindraboofooowingdingbarrwingmonkeypoundcake", vs);
}
of
【在 h*****g 的大作中提到】
: Given a list of words, L, that are all the same length, and a string, S,
: find the starting position of the substring of S that is a concatenation of
: each word in L exactly once and without any intervening characters. This
: substring will occur exactly once in S..
: .
: Example:.
: L: "fooo", "barr", "wing", "ding", "wing".
: S: "lingmindraboofooowingdingbarrwingmonkeypoundcake".
: fooowingdingbarrwing.
: trie的话,现场写程序不方便吧?
d*u
92 楼
这题用hashtable的话算是比较平庸的解法,应该达不到facebook或google的要求。正
确的做法是用单词树作为查找容器。
确的做法是用单词树作为查找容器。
S*t
93 楼
It is easy to come up with an $O(SL)$ algorithm for this problem but what is
good about this problem is that it actually has a linear time solution:
Let’s first make some notations clear:
1) |S| -> The length of S.
2) |L| -> The number of words in the list $L$.
3) $len_L$ -> The length of each string in $L$.
First we use an Aho-Corasick automaton to find out the occurrences of all
patterns. The time complexity of this step is $O(|S| + |L| * len_L + z)$
where $z$ is the number of output matches. However, since in this problem,
each index in the text string can correspond to at most one match. Therefore
, z < |S| and the complexity is therefore bounded by $O(|S| + |L| * len_L)$.
In the second step, we’ve now had an array $f$, where f[i] indicates
whether we can match a string in $L$ with substring $S[i..i+len_L-1]$. If
there is a match, f[i] = #the index of matched string in L$, otherwise f[i]
= -1.
Next, we divide this array into $len_L$ subarrays, where each subarray is of
the form: {f[i], f[i+len_L], f[i+2*len_L], …, f[i+k*len_L]}. So in each
array, what we are looking for is in fact a contiguous subarray of length |L
| which is in fact a permutation of numbers from 1 to L. We can use a deque
to achieve this aim. We first push_back the elements in each array till we
find a conflict. (i.e. the element we are going to push has already existed
in the deque). When this happens, we pop_front until the conflicted element
has been popped out of the deque. This algorithm continues till the number
of elements in the deque reaches |L|. (Yes, we do have to handle -1 cases
separately but that is quite easy.) The complexity to handle each subarray
is linear and the overall complexity is still linear.
Therefore the time complexity of the algorithm is dominated by the first
step, which is $O(|S| + |L| * len_L)$ and since |L| * len_L < |S|, the
algorithm is indeed $O(S)$.
Now let’s consider the case where there might be repetitive strings in L.
We first count the numbers of unique strings in $L$ and for each unique
string, we count the actual appearance of that string in $L$.
Then the Aho-Corasick part is still the same and we can guarantee the time
complexity is still bounded linearly.
The only difference is in the deque part where we change the conflicting
part a bit from whether that $f[i]$ already exists in deque to whether $f[i]
< cnt[f[i]]$ in deque.
And that still makes our algorithm linear. Problem solved.
good about this problem is that it actually has a linear time solution:
Let’s first make some notations clear:
1) |S| -> The length of S.
2) |L| -> The number of words in the list $L$.
3) $len_L$ -> The length of each string in $L$.
First we use an Aho-Corasick automaton to find out the occurrences of all
patterns. The time complexity of this step is $O(|S| + |L| * len_L + z)$
where $z$ is the number of output matches. However, since in this problem,
each index in the text string can correspond to at most one match. Therefore
, z < |S| and the complexity is therefore bounded by $O(|S| + |L| * len_L)$.
In the second step, we’ve now had an array $f$, where f[i] indicates
whether we can match a string in $L$ with substring $S[i..i+len_L-1]$. If
there is a match, f[i] = #the index of matched string in L$, otherwise f[i]
= -1.
Next, we divide this array into $len_L$ subarrays, where each subarray is of
the form: {f[i], f[i+len_L], f[i+2*len_L], …, f[i+k*len_L]}. So in each
array, what we are looking for is in fact a contiguous subarray of length |L
| which is in fact a permutation of numbers from 1 to L. We can use a deque
to achieve this aim. We first push_back the elements in each array till we
find a conflict. (i.e. the element we are going to push has already existed
in the deque). When this happens, we pop_front until the conflicted element
has been popped out of the deque. This algorithm continues till the number
of elements in the deque reaches |L|. (Yes, we do have to handle -1 cases
separately but that is quite easy.) The complexity to handle each subarray
is linear and the overall complexity is still linear.
Therefore the time complexity of the algorithm is dominated by the first
step, which is $O(|S| + |L| * len_L)$ and since |L| * len_L < |S|, the
algorithm is indeed $O(S)$.
Now let’s consider the case where there might be repetitive strings in L.
We first count the numbers of unique strings in $L$ and for each unique
string, we count the actual appearance of that string in $L$.
Then the Aho-Corasick part is still the same and we can guarantee the time
complexity is still bounded linearly.
The only difference is in the deque part where we change the conflicting
part a bit from whether that $f[i]$ already exists in deque to whether $f[i]
< cnt[f[i]]$ in deque.
And that still makes our algorithm linear. Problem solved.
h*8
94 楼
Can you elaborate it? Thanks!
is
Therefore
【在 S******t 的大作中提到】
: It is easy to come up with an $O(SL)$ algorithm for this problem but what is
: good about this problem is that it actually has a linear time solution:
: Let’s first make some notations clear:
: 1) |S| -> The length of S.
: 2) |L| -> The number of words in the list $L$.
: 3) $len_L$ -> The length of each string in $L$.
: First we use an Aho-Corasick automaton to find out the occurrences of all
: patterns. The time complexity of this step is $O(|S| + |L| * len_L + z)$
: where $z$ is the number of output matches. However, since in this problem,
: each index in the text string can correspond to at most one match. Therefore
is
Therefore
【在 S******t 的大作中提到】
: It is easy to come up with an $O(SL)$ algorithm for this problem but what is
: good about this problem is that it actually has a linear time solution:
: Let’s first make some notations clear:
: 1) |S| -> The length of S.
: 2) |L| -> The number of words in the list $L$.
: 3) $len_L$ -> The length of each string in $L$.
: First we use an Aho-Corasick automaton to find out the occurrences of all
: patterns. The time complexity of this step is $O(|S| + |L| * len_L + z)$
: where $z$ is the number of output matches. However, since in this problem,
: each index in the text string can correspond to at most one match. Therefore
相关阅读
南京师范大学生科院招聘科研助手One tenure-track assistant professor (co-PI) position (Gang Cai at USTC)University of Alberta来自大陆的叫兽和他老婆犯大事了我应不应该同意equal contribution?建议版主开个真正属于faculty的club (转载)千老的的中年危机向FDA说不,联合抵制转基因三文鱼。千老转行求建议zt寻找耳鼻喉科就修机会if sequestration happens, NCI budget will be cut 6%Please help to find a paper投稿迟迟不给回音,该催吗?学分子生物的ph.d毕业后能去湾区制药公司吗医学院里面的bio-marker怎么样?这种copycat也能上nature biotech?北美生物WSN也性侵禁锢未成年少女了,还是夫妻店 (转载)如果错过了k99的5年期限,还有什么transition grant是找faculty位置时可以加分的?RNAi实验被reviewer要求补protein level的数据,不补是不是不行了阿关于NIH K99 和K22的申请国人 wsn AP 真的丢人,强要人家周末干活ZT